Class StyleableObjectProperty<T>
java.lang.Object
javafx.beans.binding.ObjectExpression<T>
javafx.beans.property.ReadOnlyObjectProperty<T>
javafx.beans.property.ObjectProperty<T>
javafx.beans.property.ObjectPropertyBase<T>
javafx.css.StyleableObjectProperty<T>
- Type Parameters:
T- the property value type
- All Implemented Interfaces:
Observable, Property<T>, ReadOnlyProperty<T>, ObservableObjectValue<T>, ObservableValue<T>, WritableObjectValue<T>, WritableValue<T>, StyleableProperty<T>
- Direct Known Subclasses:
SimpleStyleableObjectProperty
public abstract class StyleableObjectProperty<T>
extends ObjectPropertyBase<T>
implements StyleableProperty<T>
This class extends
ObjectPropertyBase and provides a partial
implementation of a StyleableProperty. The method
StyleableProperty.getCssMetaData() is not implemented.
This class is used to make a ObjectProperty,
that would otherwise be implemented as a ObjectPropertyBase,
styleable by CSS.- Since:
- JavaFX 8.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionThe constructor of theStyleableObjectProperty.StyleableObjectProperty(T initialValue) The constructor of theStyleableObjectProperty. -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyStyle(StyleOrigin origin, T newValue) This method is called from CSS code to set the value of the property.Tells the origin of the value of the property.Methods declared in class ObjectPropertyBase
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 T> listener) Adds aChangeListenerwhich will be notified whenever the value of theObservableValuechanges.voidbind(ObservableValue<? extends T> newObservable) Create a unidirection binding for thisProperty.protected voidSends notifications to all attachedInvalidationListenersandChangeListeners.get()Returns the current value of thisObservableObjectValue<T>.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 T> listener) Removes the given listener from the list of listeners that are notified whenever the value of theObservableValuechanges.voidSet the wrapped value.toString()Returns a string representation of thisObjectPropertyBaseobject.voidunbind()Remove the unidirectional binding for thisProperty.Methods declared in class ObjectProperty
bindBidirectional, setValue, unbindBidirectionalModifier and TypeMethodDescriptionvoidbindBidirectional(Property<T> other) Create a bidirectional binding between thisPropertyand another one.voidSet the wrapped value.voidunbindBidirectional(Property<T> other) Removes a bidirectional binding between thisPropertyand another one.Methods declared in class ObjectExpression
asString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpressionModifier and TypeMethodDescriptionasString()getValue()Returns the current value of thisObservableValueCreates a newBooleanExpressionthat holdstrueif thisObjectExpressionis equal to a constant value.isEqualTo(ObservableObjectValue<?> other) Creates a newBooleanExpressionthat holdstrueif this and anotherObservableObjectValueare equal.isNotEqualTo(Object other) Creates a newBooleanExpressionthat holdstrueif thisObjectExpressionis not equal to a constant value.isNotEqualTo(ObservableObjectValue<?> other) Creates a newBooleanExpressionthat holdstrueif this and anotherObservableObjectValueare not equal.isNull()static <T> ObjectExpression<T> objectExpression(ObservableObjectValue<T> value) Returns anObjectExpressionthat wraps anObservableObjectValue.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 T, ? 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<T> Returns anObservableValuethat holds this value, or the given constant if it isnull.default Subscriptionsubscribe(BiConsumer<? super T, ? super T> 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<T> when(ObservableValue<Boolean> condition) Returns anObservableValuethat holds this value and is updated only whenconditionholdstrue.Methods declared in interface ReadOnlyProperty
getBean, getNameMethods declared in interface StyleableProperty
getCssMetaDataModifier and TypeMethodDescriptionCssMetaData<? extends Styleable, T> Reflect back the CssMetaData that corresponds to thisjavafx.beans.property.StyleablePropertyMethods declared in interface WritableValue
getValue
-
Constructor Details
-
StyleableObjectProperty
public StyleableObjectProperty()The constructor of theStyleableObjectProperty. -
StyleableObjectProperty
The constructor of theStyleableObjectProperty.- Parameters:
initialValue- the initial value of the wrappedObject
-
-
Method Details
-
applyStyle
This method is called from CSS code to set the value of the property.- Specified by:
applyStylein interfaceStyleableProperty<T>- Parameters:
origin- the originnewValue- the value
-
getStyleOrigin
Tells the origin of the value of the property. This is needed to determine whether or not CSS can override the value.- Specified by:
getStyleOriginin interfaceStyleableProperty<T>- Returns:
- the style origin
-