public interface DesignMode
BeanContextChild
implementors implement this to get information
about whether they are in a design time or runtime environment.
The reason this is restricted to BeanContextChild
ren is that
only things in the BeanContext
hierarchy are given this
information in the first place.BeanContextChild
Modifier and Type | Field and Description |
---|---|
static String |
PROPERTYNAME
Use this name when firing
PropertyChangeEvent s from your Bean. |
Modifier and Type | Method and Description |
---|---|
boolean |
isDesignTime()
This method should tell whether it is design time or runtime.
|
void |
setDesignTime(boolean designTime)
The environment will call this method on your
BeanContextChild when it is registered in a parent
BeanContext or when behavior needs to switch from
design time to runtime behavior (or vice versa). |
static final String PROPERTYNAME
PropertyChangeEvent
s from your Bean.void setDesignTime(boolean designTime)
BeanContextChild
when it is registered in a parent
BeanContext
or when behavior needs to switch from
design time to runtime behavior (or vice versa).
BeanContext
s are required to fire
PropertyChangeEvent
s when properties change.
designTime
is a property, and therefore when you
implement setDesignTime()
, you need to fire a
PropertyChangeEvent
with the old value, the new
value and using PROPERTYNAME
as the property name.
designTime
- the new value of design time,
true
if it is design time,
false
if it is runtime.PropertyChangeEvent
,
BeanContext
,
PROPERTYNAME
boolean isDesignTime()
true
if design time, false
if
runtime.