Package net.infonode.properties.types
Class FloatProperty
java.lang.Object
net.infonode.properties.util.AbstractProperty
net.infonode.properties.util.ValueHandlerProperty
net.infonode.properties.types.FloatProperty
- All Implemented Interfaces:
Property
A float property.
-
Constructor Summary
ConstructorsConstructorDescriptionFloatProperty(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
Modifier and TypeMethodDescriptionbooleancanBeAssiged(Object value) Returns true if the value can be assigned to this property.floatReturns the float value of this property in a value container.floatReturns the largest value that this property can have.floatReturns the smallest value that this property can have.floatReturns the preferred amount to increase and decrease a property value by.intReturns the preferred number of digits to allocate space for in an editor for a property value.voidSets the float value of this property in a value container.Methods inherited from class net.infonode.properties.util.ValueHandlerProperty
getValue, removeValue, setValue, valueIsRemovable, valueIsSetMethods inherited from class net.infonode.properties.util.AbstractProperty
getDescription, getGroup, getName, getType, isMutable, toString
-
Constructor Details
-
FloatProperty
public FloatProperty(PropertyGroup group, String name, String description, PropertyValueHandler valueHandler) Constructor. Creates an unbounded float property.- Parameters:
group- the property groupname- the property namedescription- the property descriptionvalueHandler- 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 groupname- the property namedescription- the property descriptionvalueHandler- handles values for this propertyminValue- the smallest value that this property can havemaxValue- 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 groupname- the property namedescription- the property descriptionvalueHandler- handles values for this propertyminValue- the smallest value that this property can havemaxValue- the largest value that this property can havepreferredDigitCount- the preferred number of digits to allocate space for in an editor for a property valuepreferredDelta- the preferred amount to increase and decrease a property value by
-
-
Method Details
-
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
-
getMinValue
public float getMinValue()Returns the smallest value that this property can have.- Returns:
- the smallest value that this property can have
-
getMaxValue
public float getMaxValue()Returns the largest value that this property can have.- Returns:
- the largest value that this property can have
-
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
-
get
Returns the float value of this property in a value container.- Parameters:
valueContainer- the value container- Returns:
- the float value of this property
-
set
Sets the float value of this property in a value container.- Parameters:
valueContainer- the value containervalue- the float value
-
canBeAssiged
Description copied from interface:PropertyReturns true if the value can be assigned to this property.- Specified by:
canBeAssigedin interfaceProperty- Overrides:
canBeAssigedin classAbstractProperty- Parameters:
value- the value to assign- Returns:
- true if the value can be assigned to this property
-