net.infonode.properties.types

Class FloatProperty

public class FloatProperty extends ValueHandlerProperty

A float property.

Version: $Revision: 1.5 $

Author: $Author: jesper $

Constructor Summary
FloatProperty(PropertyGroup group, String name, String description, PropertyValueHandler valueHandler)
Constructor.
FloatProperty(PropertyGroup group, String name, String description, PropertyValueHandler valueHandler, float minValue, float maxValue)
Constructor.
FloatProperty(PropertyGroup group, String name, String description, PropertyValueHandler valueHandler, float minValue, float maxValue, int preferredDigitCount, float preferredDelta)
Constructor.
Method Summary
booleancanBeAssiged(Object value)
floatget(Object valueContainer)
Returns the float value of this property in a value container.
floatgetMaxValue()
Returns the largest value that this property can have.
floatgetMinValue()
Returns the smallest value that this property can have.
floatgetPreferredDelta()
Returns the preferred amount to increase and decrease a property value by.
intgetPreferredDigitCount()
Returns the preferred number of digits to allocate space for in an editor for a property value.
voidset(Object valueContainer, float value)
Sets the float value of this property in a value container.

Constructor Detail

FloatProperty

public FloatProperty(PropertyGroup group, String name, String description, PropertyValueHandler valueHandler)
Constructor. Creates an unbounded float property.

Parameters: group the property group name the property name description the property description valueHandler handles values for this property

FloatProperty

public FloatProperty(PropertyGroup group, String name, String description, PropertyValueHandler valueHandler, float minValue, float maxValue)
Constructor.

Parameters: group the property group name the property name description the property description valueHandler handles values for this property minValue the smallest value that this property can have maxValue the largest value that this property can have

FloatProperty

public FloatProperty(PropertyGroup group, String name, String description, PropertyValueHandler valueHandler, float minValue, float maxValue, int preferredDigitCount, float preferredDelta)
Constructor.

Parameters: group the property group name the property name description the property description valueHandler handles values for this property minValue the smallest value that this property can have maxValue the largest value that this property can have preferredDigitCount the preferred number of digits to allocate space for in an editor for a property value preferredDelta the preferred amount to increase and decrease a property value by

Method Detail

canBeAssiged

public boolean canBeAssiged(Object value)

get

public float get(Object valueContainer)
Returns the float value of this property in a value container.

Parameters: valueContainer the value container

Returns: the float value of this property

getMaxValue

public float getMaxValue()
Returns the largest value that this property can have.

Returns: the largest value that this property can have

getMinValue

public float getMinValue()
Returns the smallest value that this property can have.

Returns: the smallest value that this property can have

getPreferredDelta

public float getPreferredDelta()
Returns the preferred amount to increase and decrease a property value by.

Returns: the preferred amount to increase and decrease a property value by

getPreferredDigitCount

public int getPreferredDigitCount()
Returns the preferred number of digits to allocate space for in an editor for a property value.

Returns: the preferred number of digits to allocate space for in an editor for a property value

set

public void set(Object valueContainer, float value)
Sets the float value of this property in a value container.

Parameters: valueContainer the value container value the float value