public class IntegerProperty extends AbstractToStringProperty<java.lang.Integer>
Integer
value.AbstractToStringProperty.ChildProperty<T>
AbstractProperty.InvalidPreferenceValueException, AbstractProperty.ValueChangeEvent<T>, AbstractProperty.ValueChangeListener<T>
defaultValue, key, preferences
Constructor and Description |
---|
IntegerProperty(java.lang.String key,
int defaultValue)
Constructs a new
IntegerProperty . |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Integer |
fromString(java.lang.String string)
Converts the string to an object of the given type.
|
java.lang.Integer |
get()
Replies the value of this property.
|
boolean |
parseAndPut(java.lang.String value)
parses and saves an integer value
|
boolean |
put(java.lang.Integer value)
Sets this property to the specified value.
|
protected java.lang.String |
toString(java.lang.Integer t)
Converts the string to an object of the given type.
|
getAsString, getChildProperty, getSpecialized
addListener, addListenerImpl, addWeakListener, cached, equals, getDefaultValue, getKey, getPreferences, hashCode, isSet, remove, removeListener, removeListenerImpl, storeDefaultValue
public IntegerProperty(java.lang.String key, int defaultValue)
IntegerProperty
.key
- The property keydefaultValue
- The default valuepublic java.lang.Integer get()
AbstractProperty
get
in class AbstractToStringProperty<java.lang.Integer>
public boolean put(java.lang.Integer value)
AbstractProperty
put
in class AbstractToStringProperty<java.lang.Integer>
value
- The new value of this propertyprotected java.lang.Integer fromString(java.lang.String string)
AbstractToStringProperty
fromString
in class AbstractToStringProperty<java.lang.Integer>
string
- The stringprotected java.lang.String toString(java.lang.Integer t)
AbstractToStringProperty
toString
in class AbstractToStringProperty<java.lang.Integer>
t
- The object.public boolean parseAndPut(java.lang.String value)
value
- the value to be parsed