Class ReadOnlyFloatWrapper
- All Implemented Interfaces:
NumberExpression, Observable, Property<Number>, ReadOnlyProperty<Number>, ObservableFloatValue, ObservableNumberValue, ObservableValue<Number>, WritableFloatValue, WritableNumberValue, WritableValue<Number>
This class provides a convenient class to define read-only properties. It
creates two properties that are synchronized. One property is read-only
and can be passed to external users. The other property is read- and
writable and should be used internally only.
- Since:
- JavaFX 2.0
-
Constructor Summary
ConstructorsConstructorDescriptionThe constructor ofReadOnlyFloatWrapperReadOnlyFloatWrapper(float initialValue) The constructor ofReadOnlyFloatWrapperReadOnlyFloatWrapper(Object bean, String name) The constructor ofReadOnlyFloatWrapperReadOnlyFloatWrapper(Object bean, String name, float initialValue) The constructor ofReadOnlyFloatWrapper -
Method Summary
Modifier and TypeMethodDescriptionReturns the readonly property, that is synchronized with thisReadOnlyFloatWrapper.Methods declared in class SimpleFloatProperty
getBean, getNameMethods declared in class FloatPropertyBase
addListener, addListener, bind, fireValueChangedEvent, get, invalidated, isBound, removeListener, removeListener, set, toString, unbindModifier and TypeMethodDescriptionvoidaddListener(InvalidationListener listener) Adds anInvalidationListenerwhich will be notified whenever theObservablebecomes invalid.voidaddListener(ChangeListener<? super Number> listener) Adds aChangeListenerwhich will be notified whenever the value of theObservableValuechanges.voidbind(ObservableValue<? extends Number> rawObservable) Create a unidirection binding for thisProperty.protected voidSends notifications to all attachedInvalidationListenersandChangeListeners.floatget()Returns the current value of thisObservableFloatValue.protected voidThe methodinvalidated()can be overridden to receive invalidation notifications.booleanisBound()Can be used to check, if aPropertyis bound.voidremoveListener(InvalidationListener listener) Removes the given listener from the list of listeners, that are notified whenever the value of theObservablebecomes invalid.voidremoveListener(ChangeListener<? super Number> listener) Removes the given listener from the list of listeners that are notified whenever the value of theObservableValuechanges.voidset(float newValue) Set the wrapped value.toString()Returns a string representation of thisFloatPropertyBaseobject.voidunbind()Remove the unidirectional binding for thisProperty.Methods declared in class FloatProperty
asObject, bindBidirectional, floatProperty, setValue, unbindBidirectionalModifier and TypeMethodDescriptionasObject()Creates anObjectPropertythat bidirectionally bound to thisFloatProperty.voidbindBidirectional(Property<Number> other) Create a bidirectional binding between thisPropertyand another one.static FloatPropertyfloatProperty(Property<Float> property) Returns aFloatPropertythat wraps aPropertyand is bidirectionally bound to it.voidSet the wrapped value.voidunbindBidirectional(Property<Number> other) Removes a bidirectional binding between thisPropertyand another one.Methods declared in class ReadOnlyFloatProperty
readOnlyFloatPropertyModifier and TypeMethodDescriptionstatic <T extends Number>
ReadOnlyFloatPropertyreadOnlyFloatProperty(ReadOnlyProperty<T> property) Returns aReadOnlyFloatPropertythat wraps aReadOnlyProperty.Methods declared in class FloatExpression
add, add, add, add, divide, divide, divide, divide, doubleValue, floatExpression, floatExpression, floatValue, getValue, intValue, longValue, multiply, multiply, multiply, multiply, negate, subtract, subtract, subtract, subtractModifier and TypeMethodDescriptionadd(double other) Creates a newNumberBindingthat calculates the sum of thisNumberExpressionand a constant value.add(float other) Creates a newNumberBindingthat calculates the sum of thisNumberExpressionand a constant value.add(int other) Creates a newNumberBindingthat calculates the sum of thisNumberExpressionand a constant value.add(long other) Creates a newNumberBindingthat calculates the sum of thisNumberExpressionand a constant value.divide(double other) Creates a newNumberBindingthat calculates the division of thisNumberExpressionand a constant value.divide(float other) Creates a newNumberBindingthat calculates the division of thisNumberExpressionand a constant value.divide(int other) Creates a newNumberBindingthat calculates the division of thisNumberExpressionand a constant value.divide(long other) Creates a newNumberBindingthat calculates the division of thisNumberExpressionand a constant value.doubleReturns the value of thisObservableNumberValueas adouble.static FloatExpressionReturns aFloatExpressionthat wraps aObservableFloatValue.static <T extends Number>
FloatExpressionfloatExpression(ObservableValue<T> value) Returns aFloatExpressionthat wraps anObservableValue.floatReturns the value of thisObservableNumberValueas afloat.getValue()Returns the current value of thisObservableValueintintValue()Returns the value of thisObservableNumberValueas anint.longReturns the value of thisObservableNumberValueas along.multiply(double other) Creates a newNumberBindingthat calculates the product of thisNumberExpressionand a constant value.multiply(float other) Creates a newNumberBindingthat calculates the product of thisNumberExpressionand a constant value.multiply(int other) Creates a newNumberBindingthat calculates the product of thisNumberExpressionand a constant value.multiply(long other) Creates a newNumberBindingthat calculates the product of thisNumberExpressionand a constant value.negate()Creates a newNumberBindingthat calculates the negation ofNumberExpression.subtract(double other) Creates a newNumberBindingthat calculates the difference of thisNumberExpressionand a constant value.subtract(float other) Creates a newNumberBindingthat calculates the difference of thisNumberExpressionand a constant value.subtract(int other) Creates a newNumberBindingthat calculates the difference of thisNumberExpressionand a constant value.subtract(long other) Creates a newNumberBindingthat calculates the difference of thisNumberExpressionand a constant value.Methods declared in class NumberExpressionBase
add, asString, asString, asString, divide, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, greaterThanOrEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, isNotEqualTo, lessThan, lessThan, lessThan, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, lessThanOrEqualTo, multiply, numberExpression, subtractModifier and TypeMethodDescriptionadd(ObservableNumberValue other) Creates a newNumberBindingthat calculates the sum of thisNumberExpressionand anotherObservableNumberValue.asString()divide(ObservableNumberValue other) Creates a newNumberBindingthat calculates the division of thisNumberExpressionand anotherObservableNumberValue.greaterThan(double other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than a constant value.greaterThan(float other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than a constant value.greaterThan(int other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than a constant value.greaterThan(long other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than a constant value.greaterThan(ObservableNumberValue other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than anotherObservableNumberValue.greaterThanOrEqualTo(double other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than or equal to a constant value.greaterThanOrEqualTo(float other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than or equal to a constant value.greaterThanOrEqualTo(int other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than or equal to a constant value.greaterThanOrEqualTo(long other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than or equal to a constant value.Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis greater than or equal to anotherObservableNumberValue.isEqualTo(double other, double epsilon) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis equal to a constant value (with a tolerance).isEqualTo(float other, double epsilon) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis equal to a constant value (with a tolerance).isEqualTo(int other) isEqualTo(int other, double epsilon) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis equal to a constant value (with a tolerance).isEqualTo(long other) isEqualTo(long other, double epsilon) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis equal to a constant value (with a tolerance).isEqualTo(ObservableNumberValue other) isEqualTo(ObservableNumberValue other, double epsilon) Creates a newBooleanBindingthat holdstrueif this and anotherObservableNumberValueare equal (with a tolerance).isNotEqualTo(double other, double epsilon) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis not equal to a constant value (with a tolerance).isNotEqualTo(float other, double epsilon) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis not equal to a constant value (with a tolerance).isNotEqualTo(int other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis not equal to a constant value.isNotEqualTo(int other, double epsilon) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis not equal to a constant value (with a tolerance).isNotEqualTo(long other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis not equal to a constant value.isNotEqualTo(long other, double epsilon) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis not equal to a constant value (with a tolerance).Creates a newBooleanBindingthat holdstrueif this and anotherObservableNumberValueare not equal.isNotEqualTo(ObservableNumberValue other, double epsilon) Creates a newBooleanBindingthat holdstrueif this and anotherObservableNumberValueare not equal (with a tolerance).lessThan(double other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis lesser than a constant value.lessThan(float other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis lesser than a constant value.lessThan(int other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis lesser than a constant value.lessThan(long other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis lesser than a constant value.lessThan(ObservableNumberValue other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis lesser than anotherObservableNumberValue.lessThanOrEqualTo(double other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis less than or equal to a constant value.lessThanOrEqualTo(float other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis less than or equal to a constant value.lessThanOrEqualTo(int other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis less than or equal to a constant value.lessThanOrEqualTo(long other) Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis less than or equal to a constant value.Creates a newBooleanBindingthat holdstrueif thisNumberExpressionis less than or equal to anotherObservableNumberValue.multiply(ObservableNumberValue other) Creates a newNumberBindingthat calculates the product of thisNumberExpressionand anotherObservableNumberValue.static <S extends Number>
NumberExpressionBaseReturns anNumberExpressionBasethat wraps aObservableNumberValue.subtract(ObservableNumberValue other) Creates a newNumberBindingthat calculates the difference of thisNumberExpressionand anotherObservableNumberValue.Methods declared in class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods declared in interface Observable
subscribeModifier and TypeMethodDescriptiondefault SubscriptionCreates aSubscriptionon thisObservablewhich callsinvalidationSubscriberwhenever it becomes invalid.Methods declared in interface ObservableValue
flatMap, map, orElse, subscribe, subscribe, whenModifier and TypeMethodDescriptiondefault <U> ObservableValue<U> flatMap(Function<? super Number, ? extends ObservableValue<? extends U>> mapper) Returns anObservableValuethat holds the value of anObservableValueproduced by applying the given mapping function on this value.default <U> ObservableValue<U> Returns anObservableValuethat holds the result of applying the given mapping function on this value.default ObservableValue<Number> Returns anObservableValuethat holds this value, or the given constant if it isnull.default Subscriptionsubscribe(BiConsumer<? super Number, ? super Number> changeSubscriber) Creates aSubscriptionon thisObservableValuewhich calls the givenchangeSubscriberwith the old and new value whenever its value changes.default SubscriptionCreates aSubscriptionon thisObservableValuewhich immediately provides the current value to the givenvalueSubscriber, followed by any subsequent values whenever its value changes.default ObservableValue<Number> when(ObservableValue<Boolean> condition) Returns anObservableValuethat holds this value and is updated only whenconditionholdstrue.Methods declared in interface WritableValue
getValue
-
Constructor Details
-
ReadOnlyFloatWrapper
public ReadOnlyFloatWrapper()The constructor ofReadOnlyFloatWrapper -
ReadOnlyFloatWrapper
public ReadOnlyFloatWrapper(float initialValue) The constructor ofReadOnlyFloatWrapper- Parameters:
initialValue- the initial value of the wrapped value
-
ReadOnlyFloatWrapper
-
ReadOnlyFloatWrapper
-
-
Method Details
-
getReadOnlyProperty
Returns the readonly property, that is synchronized with thisReadOnlyFloatWrapper.- Returns:
- the readonly property
-