IPropertyNode
This interface extends IPropertyNode to provide property value access and editing. Nodes in an IElement's property heirarchy that have values should implement this interface. In addtion to methods for getting and setting the value object, this interface returns the editor component that the property view will use to display and edit the value.
Normally the property editor returned by this interface will be configured to handle all necessary validation of user input. However, the validate callback in this interface provides an additional opportunity for validation checking of an edited value.
As an example, the default property text field editor may be configured to prohibit empty strings and to restrict certain character input. However, the property value may need a name uniqueness check which the IProperty implementor may choose to put inside the IProperty.validate callback which searches the containing structure of the property's IElement.
Related Topics
DefaultProperty
IPropertyNode
Method Summary |
public |
|
public |
|
public boolean |
|
public boolean |
|
public boolean |
|
public void |
|
public void | |
public |
Methods from interface com.bea.ide.ui.propertyeditor. |
|
Method Detail |
public IPropertyEditor
getEditor()
Returns the component used to display and edit the property value
in the IDE's property view.
public Object
getValue()
Returns the value of this property.
The PropertyEditor returned by getEditor must
be able to handle this type of object.
public boolean hasDefault()Returns whether this property has a default value. If false, then isDefault and resetToDefault will not be used. If true, then if isDefault is true, then resetToDefault should set the property value to its default.
public boolean isDefault()Returns whether the current value is the default. The property editor will display default and non-default values differently.
public boolean isEditable()Returns whether this property can be can be changed. If false, setValue and resetToDefault should not be called on this property.
public void resetToDefault()Sets the value of this property to its default value. Will only be called if the property has a default, is editable, and is not currently a default.
public void setValue(Object
value)
Sets the value of this property.
Called by the property editor to commit an
edited property value. Property editor
validation checks will be performed and the
validate callback will be made before setValue
is called.
publicCalled by the property editor to determine whether the edited object is an acceptable value for this property. This method will be called by the property editor before it calls setValue.PropertyError
validate(Object
value)
Note that the property editor may be configured to do all necessary input validation and so no additional validation may be needed in this callback.
A null return indicates the value is valid.