net.infonode.properties.util
Class ValueHandlerProperty

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

Version:
$Revision: 1.6 $

Constructor Summary
ValueHandlerProperty(PropertyGroup group, String name, Class type, String description, PropertyValueHandler valueHandler)
          Constructor.
 
Method Summary
 Object getValue(Object object)
          Returns the value of this property in a value container.
 void removeValue(Object object)
          Removes the value of this property from an valueContainer.
 void setValue(Object object, Object value)
          Sets the value of this property in an object.
 boolean valueIsRemovable(Object object)
          Returns true if the value of this property can be removed from the valueContainer.
 boolean valueIsSet(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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ValueHandlerProperty

public ValueHandlerProperty(PropertyGroup group,
                            String name,
                            Class type,
                            String description,
                            PropertyValueHandler valueHandler)
Constructor.

Parameters:
group - the property group
name - the property name
type - the property type
description - the property description
valueHandler - handles 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 AbstractProperty

getValue

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


Copyright © 2007 NNL Technology AB. All Rights Reserved.