Package net.infonode.properties.util
Class ValueHandlerProperty
- java.lang.Object
-
- net.infonode.properties.util.AbstractProperty
-
- net.infonode.properties.util.ValueHandlerProperty
-
- All Implemented Interfaces:
Property
- Direct Known Subclasses:
BooleanProperty
,BorderProperty
,ButtonFactoryProperty
,ColorProperty
,ComponentPainterProperty
,DimensionProviderProperty
,DockingWindowActionProperty
,DockingWindowTitleProviderProperty
,DropFilterProperty
,EnumProperty
,FloatProperty
,FontProperty
,HoverListenerProperty
,IconProperty
,InsetsProperty
,NumberProperty
,PropertyGroupProperty
,StringProperty
public class ValueHandlerProperty extends AbstractProperty
Base class for properties that use aPropertyValueHandler
.
-
-
Constructor Summary
Constructors Constructor Description ValueHandlerProperty(PropertyGroup group, java.lang.String name, java.lang.Class type, java.lang.String description, PropertyValueHandler valueHandler)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Object
getValue(java.lang.Object object)
Returns the value of this property in a value container.void
removeValue(java.lang.Object object)
Removes the value of this property from an valueContainer.void
setValue(java.lang.Object object, java.lang.Object value)
Sets the value of this property in an object.boolean
valueIsRemovable(java.lang.Object object)
Returns true if the value of this property can be removed from the valueContainer.boolean
valueIsSet(java.lang.Object object)
Returns true if this property has a value in the valueContainer.-
Methods inherited from class net.infonode.properties.util.AbstractProperty
canBeAssiged, getDescription, getGroup, getName, getType, isMutable, toString
-
-
-
-
Constructor Detail
-
ValueHandlerProperty
public ValueHandlerProperty(PropertyGroup group, java.lang.String name, java.lang.Class type, java.lang.String description, PropertyValueHandler valueHandler)
Constructor.- Parameters:
group
- the property groupname
- the property nametype
- the property typedescription
- the property descriptionvalueHandler
- handles values for this property
-
-
Method Detail
-
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 interfaceProperty
- Overrides:
setValue
in classAbstractProperty
- Parameters:
object
- the object to set the property value invalue
- the value of the 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.- 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
-
valueIsRemovable
public boolean valueIsRemovable(java.lang.Object object)
Description copied from interface:Property
Returns true if the value of this property can be removed from the valueContainer.- Parameters:
object
- the object from which to remove the value- Returns:
- true if the value of this property can be removed from the valueContainer
-
removeValue
public void removeValue(java.lang.Object object)
Description copied from interface:Property
Removes the value of this property from an valueContainer.- Parameters:
object
- the object in which to remove the value
-
valueIsSet
public boolean valueIsSet(java.lang.Object object)
Description copied from interface:Property
Returns true if this property has a value in the valueContainer.- Parameters:
object
- the object that might contain the value- Returns:
- true if this property has a value in the valueContainer
-
-