|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The Customizer2 interface describes a context-aware customizer for a JavaBean. A component author may wish to supply a customizer for their JavaBean, which is a dialog that pops up and provides a rich set of UI controls to manipulate the configuration of the entire JavaBean. This type of Customizer has significantly more access to the context that the JavaBean is being designed in, and thus allows for much greater functionality.
The dialog title and icon will use the values from 'getDisplayName()' and 'getSmallIcon()' respectively.
If a Customizer2 is apply capable (isApplyCapable() returns true), the host dialog will have three buttons: "OK", "Apply", and "Cancel" (and possibly "Help" if there is a helpKey). The 'isModified' method will be called each time a PropertyChangeEvent is fired to check if the "Apply" button should be enabled. When the user clicks "OK" or "Apply", the 'applyChanges' method is called. This implies that manipulations in the dialog are not directly affecting the DesignBean. The DesignBean should not be touched until 'applyChanges' has been called.
If a Customizer2 is NOT apply capable (isApplyCapable() returns false), the host dialog will only have one button: "Done" (and possibly "Help" if there is a helpKey). The DesignBean may be manipulated at will in this dialog, as it is considered to be non-stateful. When the user clicks "Done", the 'applyChanges' method will be called.
IMPLEMENTED BY THE COMPONENT AUTHOR - This interface is designed to be implemented by the component (bean) author.
Customizer| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Standard propertyChange events - 'null' property name indicates that the bean changed in some other way than just a property. |
Result |
applyChanges()
Notifies the customizer that the user has clicked "OK" or "Apply" and the customizer should commit it's changes to the DesignBean. |
java.awt.Component |
getCustomizerPanel(DesignBean designBean)
Returns a UI panel (should be lightweight) to be displayed to the user. |
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners()
Standard propertyChange events - 'null' property name indicates that the bean changed in some other way than just a property. |
boolean |
isApplyCapable()
If a Customizer2 is apply capable (isApplyCapable() returns true), the host dialog will have three buttons: "OK", "Apply", and "Cancel" (and possibly "Help" if there is a helpKey). |
boolean |
isModified()
Returns true if the customizer is in an edited state - to notify the customizer dialog that the "Apply" button should be activated |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Standard propertyChange events - 'null' property name indicates that the bean changed in some other way than just a property. |
| Methods inherited from interface com.sun.rave.designtime.DisplayItem |
getDescription, getDisplayName, getHelpKey, getLargeIcon, getSmallIcon |
| Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The PropertyChangeListener to addpublic Result applyChanges()
public java.awt.Component getCustomizerPanel(DesignBean designBean)
designBean - the DesignBean to be customized
public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
public boolean isApplyCapable()
If a Customizer2 is apply capable (isApplyCapable() returns true), the host dialog will have three buttons: "OK", "Apply", and "Cancel" (and possibly "Help" if there is a helpKey). The 'isModified' method will be called each time a PropertyChangeEvent is fired to check if the "Apply" button should be enabled. When the user clicks "OK" or "Apply", the 'applyChanges' method is called. This implies that manipulations in the dialog are not directly affecting the DesignBean. The DesignBean should not be touched until 'applyChanges' has been called.
If a Customizer2 is NOT apply capable (isApplyCapable() returns false), the host dialog will only have one button: "Done" (and possibly "Help" if there is a helpKey). The DesignBean may be manipulated at will in this dialog, as it is considered to be non-stateful. When the user clicks "Done", the 'applyChanges' method will be called.
isModified(),
applyChanges()public boolean isModified()
public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
listener - The PropertyChangeListener to remove
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||