DefaultProperty Class

com.bea.ide.ui.propertyeditor
DefaultProperty Class

public abstract class DefaultProperty

    extends DefaultPropertyNode
    implements IProperty

An abstract default implementation of IProperty. This class may be used as a container of other IPropertyNodes. It may also be subclassed to implement IProperty and carry a value. If a subclass has a default property value it should override hasDefault, isDefault, and resetToDefault.


Hierarchy
Object
  DefaultPropertyNode
    DefaultProperty
All Implemented Interfaces

IProperty, IPropertyNode

Constructor Summary

DefaultProperty()

DefaultProperty(boolean editable, String label, String description)

DefaultProperty(boolean editable)

DefaultProperty(String label, String description, List children)

 

Method Summary

public boolean
hasDefault()
Returns whether this property has a default value.
public boolean
isDefault()
Returns whether the current value is the default.
public boolean
isEditable()
Returns whether this property can be can be changed.
public void
resetToDefault()
Sets the value of this property to its default value.
public PropertyError
validate(Object value)
Called by the property editor to determine whether the edited object is an acceptable value for this property.
 
Methods from  com.bea.ide.ui.propertyeditor.DefaultPropertyNode
addChild, createAddActionProxy, createBuilderActionProxy, createDeleteActionProxy, getAction, getChildren, getDescription, getLabel, setChildren, setDescription, setLabel
 
Methods from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
   
Methods from interface com.bea.ide.ui.propertyeditor.IProperty
getEditor, getValue, hasDefault, isDefault, isEditable, resetToDefault, setValue, validate
 
Methods from interface com.bea.ide.ui.propertyeditor.IPropertyNode
getAction, getChildren, getDescription, getLabel
 

Constructor Detail

DefaultProperty

protected DefaultProperty()

DefaultProperty

protected DefaultProperty(boolean editable, 
                          String label, 
                          String description)

DefaultProperty

protected DefaultProperty(boolean editable)

DefaultProperty

protected DefaultProperty(String label, 
                          String description, 
                          List children)
 

Method Detail

hasDefault() Method

public boolean hasDefault()
Description copied from IProperty.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.

Related Topics

IProperty.hasDefault()


isDefault() Method

public boolean isDefault()
Description copied from IProperty.isDefault()
Returns whether the current value is the default. The property editor will display default and non-default values differently.

Related Topics

IProperty.isDefault()


isEditable() Method

public boolean isEditable()
Description copied from IProperty.isEditable()
Returns whether this property can be can be changed. If false, setValue and resetToDefault should not be called on this property.

Related Topics

IProperty.isEditable()


resetToDefault() Method

public void resetToDefault()
Description copied from IProperty.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.

Related Topics

IProperty.resetToDefault()


validate(Object) Method

public PropertyError validate(Object value)
Description copied from IProperty.validate(Object)
Called 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.

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.

Parameters

value
Edited property value to validate.

Returns

PropertyError if there is a validation problem, null if the value is valid.

Related Topics

IProperty.validate(Object)