net.infonode.properties.types
Class EnumProperty

java.lang.Object
  extended bynet.infonode.properties.util.AbstractProperty
      extended bynet.infonode.properties.util.ValueHandlerProperty
          extended bynet.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 $

Constructor Summary
EnumProperty(PropertyGroup group, String name, Class type, String description, PropertyValueHandler valueHandler, Object[] validValues)
          Constructor.
 
Method Summary
 Object[] getValidValues()
          Returns the valid values for this property.
 Object getValue(Object object)
          Returns the value of this property in a value container.
 void setValue(Object object, Object value)
          Sets the value of this property in an object.
 
Methods inherited from class net.infonode.properties.util.ValueHandlerProperty
removeValue, valueIsRemovable, valueIsSet
 
Methods inherited from class net.infonode.properties.util.AbstractProperty
canBeAssiged, getDescription, getGroup, getName, getType, isMutable, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

EnumProperty

public EnumProperty(PropertyGroup group,
                    String name,
                    Class type,
                    String description,
                    PropertyValueHandler valueHandler,
                    Object[] validValues)
Constructor.

Parameters:
group - the property group
name - the property name
type - the property type
description - the property description
valueHandler - handles values for this property
validValues - valid values for this property
Method Detail

setValue

public void setValue(Object object,
                     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

getValidValues

public Object[] getValidValues()
Returns the valid values for this property.

Returns:
the valid values for this property

getValue

public Object getValue(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


Copyright © 2007 NNL Technology AB. All Rights Reserved.