net.infonode.properties.types
Class EnumProperty
java.lang.Object
net.infonode.properties.util.AbstractProperty
net.infonode.properties.util.ValueHandlerProperty
net.infonode.properties.types.EnumProperty
- All Implemented Interfaces:
- Property
- Direct Known Subclasses:
- AlignmentProperty, DirectionProperty, TabAreaVisiblePolicyProperty, TabbedPanelHoverPolicyProperty, TabDepthOrderPolicyProperty, TabDropDownListVisiblePolicyProperty, TabLayoutPolicyProperty, TabSelectTriggerProperty, TitledTabBorderSizePolicyProperty, TitledTabSizePolicyProperty
public class EnumProperty
- extends ValueHandlerProperty
A property which value is one in a fixed set of values.
- Version:
- $Revision: 1.7 $
- Author:
- $Author: jesper $
Method Summary |
java.lang.Object[] |
getValidValues()
Returns the valid values for this property. |
java.lang.Object |
getValue(java.lang.Object object)
Returns the value of this property in a value container. |
void |
setValue(java.lang.Object object,
java.lang.Object value)
Sets the value of this property in an object. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
validValues
private java.lang.Object[] validValues
EnumProperty
public EnumProperty(PropertyGroup group,
java.lang.String name,
java.lang.Class type,
java.lang.String description,
PropertyValueHandler valueHandler,
java.lang.Object[] validValues)
- Constructor.
- Parameters:
group
- the property groupname
- the property nametype
- the property typedescription
- the property descriptionvalueHandler
- handles values for this propertyvalidValues
- valid values for this property
setValue
public void setValue(java.lang.Object object,
java.lang.Object value)
- Description copied from interface:
Property
- Sets the value of this property in an object.
- Specified by:
setValue
in interface Property
- Overrides:
setValue
in class ValueHandlerProperty
- Parameters:
object
- the object to set the property value invalue
- the value of the property
getValidValues
public java.lang.Object[] getValidValues()
- Returns the valid values for this property.
- Returns:
- the valid values for this property
getValue
public java.lang.Object getValue(java.lang.Object object)
- Description copied from interface:
Property
- Returns the value of this property in a value container.
- Specified by:
getValue
in interface Property
- Overrides:
getValue
in class ValueHandlerProperty
- Parameters:
object
- the object containing the value
- Returns:
- the value of this property in an valueContainer, null if the container doesn't contain the value