Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.beans

Interface DesignMode

java.lang.Object
|
+--java.beans.DesignMode


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 BeanContextChildren is that only things in the BeanContext hierarchy are given this information in the first place.

Since:Author:See Also:

Field Summary

static java.lang.StringPROPERTYNAME

Use this name when firing PropertyChangeEvents from your Bean.

Method Summary

booleanisDesignTime()

This method should tell whether it is design time or runtime.
voidsetDesignTime(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).

Field Details

PROPERTYNAME

public static final String PROPERTYNAME

Use this name when firing PropertyChangeEvents from your Bean.


Method Details

isDesignTime

public boolean isDesignTime()

This method should tell whether it is design time or runtime.

Returns:


setDesignTime

public 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).

BeanContexts are required to fire PropertyChangeEvents 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.

Parameters:

See Also: