public class NumberProperty extends ValueHandlerProperty
Constructor and Description |
---|
NumberProperty(PropertyGroup group,
java.lang.String name,
java.lang.Class cl,
java.lang.String description,
long minValue,
long maxValue,
int preferredDigitCount,
PropertyValueHandler valueHandler)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeAssiged(java.lang.Object value)
Returns true if the value can be assigned to this property.
|
long |
getLongValue(java.lang.Object valueContainer)
Returns the long value of this property in a value container.
|
long |
getMaxValue()
Returns the largest value that this property can have.
|
long |
getMinValue()
Returns the smallest value that this property can have.
|
int |
getPreferredDigitCount()
Returns the preferred number of digits to allocate space for in an editor for a property value
|
getValue, removeValue, setValue, valueIsRemovable, valueIsSet
getDescription, getGroup, getName, getType, isMutable, toString
public NumberProperty(PropertyGroup group, java.lang.String name, java.lang.Class cl, java.lang.String description, long minValue, long maxValue, int preferredDigitCount, PropertyValueHandler valueHandler)
group
- the property groupname
- the property namecl
- the property typedescription
- the property descriptionminValue
- 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 valuevalueHandler
- handles values for this propertypublic int getPreferredDigitCount()
public long getMinValue()
public long getMaxValue()
public long getLongValue(java.lang.Object valueContainer)
valueContainer
- the value containerpublic boolean canBeAssiged(java.lang.Object value)
Property
canBeAssiged
in interface Property
canBeAssiged
in class AbstractProperty
value
- the value to assign