propertyManager
Class EditableFloatProperty
java.lang.Object
propertyManager.ReadableProperty
propertyManager.EditableProperty
propertyManager.EditableFloatProperty
- All Implemented Interfaces:
- java.io.Serializable, INumericProperty
public class EditableFloatProperty
- extends EditableProperty
- implements INumericProperty
- Author:
- Dan Phifer
The EditableFloatProperty class works with the PropertyManager class
to allow Float values to be entered and validated through the
properties view.
- See Also:
- Serialized Form
|
Constructor Summary |
EditableFloatProperty(java.lang.String id,
java.lang.String name,
float defaultValue)
|
| Methods inherited from class propertyManager.ReadableProperty |
addPropertyChangeListener, getDefaultValue, getID, getName, getPropertyDescriptor, getSubPropertyManager, getUnderlyingDefaultValue, getUnderlyingValue, getValue, hasDefaultValue, hasDynamicPropertyDescriptor, hasSubProperties, hasValue, notifyPropertyChangeListeners, removePropertyChangeListener, setCategory, setDefaultValue, setLabelProvider, setSubPropertyManager, setUnderlyingDefaultValue |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
maximum
private float maximum
minimum
private float minimum
EditableFloatProperty
public EditableFloatProperty(java.lang.String id,
java.lang.String name,
float defaultValue)
- Parameters:
id - The unique identifier for this propertyname - The name to be displayed to the userdefaultValue - The value to be used by default
setMinimum
public void setMinimum(float minimum)
- Parameters:
minimum - The minimum allowable value. Any values lower than minimum
will be rejected by the validator and the user will be
informed via the status bar
setMaximum
public void setMaximum(float maximum)
- Parameters:
maximum - The maximum allowable value. Any values higher than maximum
will be rejected by the validator and the user will be
informed via the status bar
setDefaultValue
public void setDefaultValue(float defaultValue)
- Sets the default value of the property. The default value will be used
initially, and the user can revert to the default value.
- Parameters:
defaultValue - The defaultValue
setValue
public void setValue(float newValue)
- Parameters:
newValue - The new value of the property.
getValidator
public org.eclipse.jface.viewers.ICellEditorValidator getValidator()
- Overrides:
getValidator in class EditableProperty
getFloatValue
public java.lang.Float getFloatValue()
- Ensures that the returned value is a Float object. If the actual value
- Returns:
- an Float object.
getFloat
private java.lang.Float getFloat(java.lang.Object value)
- Parameters:
value - An object (String or Float) to be interpreted as a Float.
- Returns:
- A Float object that is equivalent to the given value.
getNumberValue
public java.lang.Number getNumberValue()
- Specified by:
getNumberValue in interface INumericProperty
setNumberValue
public void setNumberValue(java.lang.Number value)
- Specified by:
setNumberValue in interface INumericProperty