|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PropertyBrowser
Defines the methods an editor for an object must implement.
The setObject(Object, boolean) method will be called by the framework when the object
is about to be displayed in the editor.
If the user modifies a property of the object, the editor should create
a clone of the object. In this case, the getModifiedObject() method
should return the modified clone.
| Method Summary | |
|---|---|
void |
addPropertyBrowserListener(PropertyBrowserListener listener)
Adds a PropertyBrowserListener to the receiver which notifies the listener of any
property change when the firePropertyBrowserEvent(org.openbp.jaspira.propertybrowser.PropertyBrowserEvent) method is called. |
void |
configureSubComponent(javax.swing.JComponent propertyEditorComponent)
Configures a property editor component for usage with this property browser. |
void |
firePropertyBrowserEvent(PropertyBrowserEvent e)
Notifies all registered PropertyBrowserListener 's registered with the receiver that
the property editor has stopped editing the property. |
java.lang.Object |
getModifiedObject()
Gets the clone of the edited object that has been modified. |
java.lang.Object |
getObject()
Gets the object that is currently edited. |
java.lang.Object |
getOriginalObject()
Gets the optional object the 'object' is based upon. |
java.lang.String[] |
getVisibleMembers()
Gets the array of property names that should be displayed or null for all. |
void |
handleKeyEvent(java.awt.event.KeyEvent e)
Processses a key event. |
boolean |
isObjectModified()
Gets the flag used to determine if the original object has changed. |
boolean |
isObjectNew()
Gets the flag that determines if the object has just been created. |
boolean |
isReadOnly()
Gets wheter the object is read only. |
boolean |
isSaveImmediately()
Gets the save after modifying property flag. |
void |
removePropertyBrowserListener(PropertyBrowserListener listener)
Removes a PropertyBrowserListener from the receiver. |
boolean |
reset()
|
boolean |
saveObject()
Save the object. |
void |
setObject(java.lang.Object object,
boolean isObjectNew)
Sets the object to be displayed/edited. |
void |
setObject(java.lang.Object object,
boolean isObjectNew,
MultiIcon rootIcon)
Sets the object to be displayed/edited. |
void |
setObject(java.lang.Object object,
boolean isObjectNew,
ObjectNode rootNode)
Sets the object to be displayed/edited. |
void |
setObject(java.lang.Object object,
java.lang.Object modifiedObject,
boolean isObjectNew,
MultiIcon rootIcon)
Sets the object to be displayed/edited. |
void |
setObject(java.lang.Object object,
java.lang.Object modifiedObject,
boolean isObjectNew,
MultiIcon rootIcon,
ObjectNode rootNode)
Sets the object to be displayed/edited. |
void |
setObjectModified(boolean objectModified)
Sets the flag used to determine if the original object has changed. |
void |
setObjectNew(boolean isObjectNew)
Sets the flag that determines if the object has just been created. |
void |
setOriginalObject(java.lang.Object originalObject)
Sets the optional object the 'object' is based upon. |
void |
setReadOnly(boolean readOnly)
Sets the propertybrowser readonly. |
void |
setSaveImmediately(boolean saveImmediately)
Sets the save after modifying property flag. |
void |
setVisibleMembers(java.lang.String[] visibleMembers)
Sets the array of property names that should be displayed or null for all. |
| Method Detail |
|---|
void setObject(java.lang.Object object,
boolean isObjectNew)
throws XMLDriverException,
java.lang.CloneNotSupportedException
object - The object to edit or nullisObjectNew - Flag that determines if the object has just been created
XMLDriverException - If no object descriptor could be found for the specified object
java.lang.CloneNotSupportedException - If the object is not cloneable
void setObject(java.lang.Object object,
boolean isObjectNew,
ObjectNode rootNode)
throws XMLDriverException,
java.lang.CloneNotSupportedException
object - The object to edit or nullisObjectNew - Flag that determines if the object has just been createdrootNode - Root node of the property browser tree or null if the property browser
should create an appropriate property browser tree based on the class of the object
XMLDriverException - If no object descriptor could be found for the specified object
java.lang.CloneNotSupportedException - If the object is not cloneable
void setObject(java.lang.Object object,
boolean isObjectNew,
MultiIcon rootIcon)
throws XMLDriverException,
java.lang.CloneNotSupportedException
object - Object to editisObjectNew - Flag that determines if the object has just been createdrootIcon - Image of the root node
XMLDriverException - If no object descriptor could be found for the specified object
java.lang.CloneNotSupportedException
void setObject(java.lang.Object object,
java.lang.Object modifiedObject,
boolean isObjectNew,
MultiIcon rootIcon)
throws XMLDriverException,
java.lang.CloneNotSupportedException
object - Object to editmodifiedObject - The modified ObjectisObjectNew - Flag that determines if the object has just been createdrootIcon - Image of the root node
XMLDriverException - If no object descriptor could be found for the specified object
java.lang.CloneNotSupportedException
void setObject(java.lang.Object object,
java.lang.Object modifiedObject,
boolean isObjectNew,
MultiIcon rootIcon,
ObjectNode rootNode)
throws XMLDriverException,
java.lang.CloneNotSupportedException
object - Object to editmodifiedObject - The modified ObjectisObjectNew - Flag that determines if the object has just been createdrootIcon - Image of the root noderootNode - Root node of the property browser tree or null if the property browser
should create an appropriate property browser tree based on the class of the object
XMLDriverException - If no object descriptor could be found for the specified object
java.lang.CloneNotSupportedExceptionjava.lang.Object getObject()
java.lang.Object getModifiedObject()
Copyable class).
java.lang.Object getOriginalObject()
void setOriginalObject(java.lang.Object originalObject)
originalObject - The modified object or null if there is no originalboolean isObjectModified()
void setObjectModified(boolean objectModified)
boolean isObjectNew()
void setObjectNew(boolean isObjectNew)
boolean saveObject()
boolean reset()
reset()void addPropertyBrowserListener(PropertyBrowserListener listener)
PropertyBrowserListener to the receiver which notifies the listener of any
property change when the firePropertyBrowserEvent(org.openbp.jaspira.propertybrowser.PropertyBrowserEvent) method is called.
listener - Listener to addvoid removePropertyBrowserListener(PropertyBrowserListener listener)
PropertyBrowserListener from the receiver.
listener - Listener to removevoid firePropertyBrowserEvent(PropertyBrowserEvent e)
PropertyBrowserListener 's registered with the receiver that
the property editor has stopped editing the property.
e - Eventvoid handleKeyEvent(java.awt.event.KeyEvent e)
e - Eventvoid configureSubComponent(javax.swing.JComponent propertyEditorComponent)
propertyEditorComponent - Property editor componentvoid setReadOnly(boolean readOnly)
boolean isReadOnly()
boolean isSaveImmediately()
void setSaveImmediately(boolean saveImmediately)
java.lang.String[] getVisibleMembers()
void setVisibleMembers(java.lang.String[] visibleMembers)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||