|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sun.rave.designtime.BasicCustomizer2
A basic implementation of Customizer2 to subclass and/or use for convenience. The 'panelClass' defines the piece of UI to use for the customizer. If the panelClass has a constructor that takes a DesignBean, that will be used. Otherwise, a null constructor will be used.
Customizer2| Field Summary | |
protected boolean |
applyCapable
|
protected java.lang.String |
description
|
protected DesignBean |
designBean
|
protected java.lang.String |
displayName
|
protected java.lang.String |
helpKey
|
protected java.awt.Image |
largeIcon
|
protected boolean |
modified
|
protected java.lang.Class |
panelClass
|
protected java.util.Vector |
propertyChangeListeners
|
protected java.awt.Image |
smallIcon
|
| Constructor Summary | |
BasicCustomizer2()
|
|
BasicCustomizer2(java.lang.Class panelClass)
|
|
BasicCustomizer2(java.lang.Class panelClass,
java.lang.String displayName)
|
|
BasicCustomizer2(java.lang.Class panelClass,
java.lang.String displayName,
java.lang.String description)
|
|
BasicCustomizer2(java.lang.Class panelClass,
java.lang.String displayName,
java.lang.String description,
java.lang.String helpKey)
|
|
| Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
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. |
protected java.awt.Component |
createCustomizerPanel()
|
void |
firePropertyChange()
|
void |
firePropertyChange(java.beans.PropertyChangeEvent e)
|
void |
firePropertyChange(java.lang.String propName)
|
void |
firePropertyChange(java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
|
java.awt.Component |
getCustomizerPanel(DesignBean designBean)
Returns a UI panel (should be lightweight) to be displayed to the user. |
java.lang.String |
getDescription()
Returns a description for this item. |
DesignBean |
getDesignBean()
|
java.lang.String |
getDisplayName()
Returns a display name for this item. |
java.lang.String |
getHelpKey()
Returns the help key for this item. |
java.awt.Image |
getLargeIcon()
Returns a large image icon for this item. |
java.lang.Class |
getPanelClass()
|
java.beans.PropertyChangeListener[] |
getPropertyChangeListeners()
Standard propertyChange events - 'null' property name indicates that the bean changed in some other way than just a property. |
java.awt.Image |
getSmallIcon()
Returns a small image icon for this item. |
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 l)
Standard propertyChange events - 'null' property name indicates that the bean changed in some other way than just a property. |
void |
setApplyCapable(boolean applyCapable)
|
void |
setDescription(java.lang.String description)
|
void |
setDisplayName(java.lang.String displayName)
|
void |
setHelpKey(java.lang.String helpKey)
|
void |
setLargeIcon(java.awt.Image largeIcon)
|
void |
setModified(boolean modified)
|
void |
setPanelClass(java.lang.Class panelClass)
|
void |
setSmallIcon(java.awt.Image smallIcon)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean applyCapable
protected java.lang.String description
protected DesignBean designBean
protected java.lang.String displayName
protected java.lang.String helpKey
protected java.awt.Image largeIcon
protected boolean modified
protected java.lang.Class panelClass
protected java.util.Vector propertyChangeListeners
protected java.awt.Image smallIcon
| Constructor Detail |
public BasicCustomizer2()
public BasicCustomizer2(java.lang.Class panelClass)
public BasicCustomizer2(java.lang.Class panelClass,
java.lang.String displayName)
public BasicCustomizer2(java.lang.Class panelClass,
java.lang.String displayName,
java.lang.String description)
public BasicCustomizer2(java.lang.Class panelClass,
java.lang.String displayName,
java.lang.String description,
java.lang.String helpKey)
| Method Detail |
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Customizer2
addPropertyChangeListener in interface Customizer2l - The PropertyChangeListener to addpublic Result applyChanges()
Customizer2
applyChanges in interface Customizer2protected java.awt.Component createCustomizerPanel()
public void firePropertyChange()
public void firePropertyChange(java.beans.PropertyChangeEvent e)
public void firePropertyChange(java.lang.String propName)
public void firePropertyChange(java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
public java.awt.Component getCustomizerPanel(DesignBean designBean)
Customizer2
getCustomizerPanel in interface Customizer2designBean - the DesignBean to be customized
public java.lang.String getDescription()
DisplayItem
getDescription in interface DisplayItempublic DesignBean getDesignBean()
public java.lang.String getDisplayName()
DisplayItem
getDisplayName in interface DisplayItempublic java.lang.String getHelpKey()
DisplayItem
getHelpKey in interface DisplayItempublic java.awt.Image getLargeIcon()
DisplayItem
getLargeIcon in interface DisplayItempublic java.lang.Class getPanelClass()
public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
Customizer2
getPropertyChangeListeners in interface Customizer2public java.awt.Image getSmallIcon()
DisplayItem
getSmallIcon in interface DisplayItempublic boolean isApplyCapable()
Customizer2If 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.
isApplyCapable in interface Customizer2Customizer2.isModified(),
Customizer2.applyChanges()public boolean isModified()
Customizer2
isModified in interface Customizer2public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Customizer2
removePropertyChangeListener in interface Customizer2l - The PropertyChangeListener to removepublic void setApplyCapable(boolean applyCapable)
public void setDescription(java.lang.String description)
public void setDisplayName(java.lang.String displayName)
public void setHelpKey(java.lang.String helpKey)
public void setLargeIcon(java.awt.Image largeIcon)
public void setModified(boolean modified)
public void setPanelClass(java.lang.Class panelClass)
public void setSmallIcon(java.awt.Image smallIcon)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||