Class SimpleStyleableStringProperty
- All Implemented Interfaces:
Observable, Property<String>, ReadOnlyProperty<String>, ObservableObjectValue<String>, ObservableStringValue, ObservableValue<String>, WritableObjectValue<String>, WritableStringValue, WritableValue<String>, StyleableProperty<String>
This class extends
SimpleStringProperty and provides a full
implementation of a StyleableProperty.
This class is used to make a StringProperty,
that would otherwise be implemented as a SimpleStringProperty,
styleable by CSS.- Since:
- JavaFX 8.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleStyleableStringProperty(CssMetaData<? extends Styleable, String> cssMetaData) The constructor of theSimpleStyleableStringProperty.SimpleStyleableStringProperty(CssMetaData<? extends Styleable, String> cssMetaData, Object bean, String name) The constructor of theSimpleStyleableStringProperty.SimpleStyleableStringProperty(CssMetaData<? extends Styleable, String> cssMetaData, Object bean, String name, String initialValue) The constructor of theSimpleStyleableStringProperty.SimpleStyleableStringProperty(CssMetaData<? extends Styleable, String> cssMetaData, String initialValue) The constructor of theSimpleStyleableStringProperty. -
Method Summary
Modifier and TypeMethodDescriptiongetBean()Returns theObjectthat contains this property.final CssMetaData<? extends Styleable, String> Reflect back the CssMetaData that corresponds to thisjavafx.beans.property.StyleablePropertygetName()Returns the name of this property.Methods declared in class StyleableStringProperty
applyStyle, getStyleOriginModifier and TypeMethodDescriptionvoidapplyStyle(StyleOrigin origin, String 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 StringPropertyBase
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 String> listener) Adds aChangeListenerwhich will be notified whenever the value of theObservableValuechanges.voidbind(ObservableValue<? extends String> 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 String> 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 thisStringPropertyBaseobject.voidunbind()Remove the unidirectional binding for thisProperty.Methods declared in class StringProperty
bindBidirectional, bindBidirectional, bindBidirectional, setValue, unbindBidirectional, unbindBidirectionalModifier and TypeMethodDescriptionvoidbindBidirectional(Property<?> other, Format format) Create a bidirectional binding between thisStringPropertyand another arbitrary property.voidbindBidirectional(Property<String> other) Create a bidirectional binding between thisPropertyand another one.<T> voidbindBidirectional(Property<T> other, StringConverter<T> converter) Create a bidirectional binding between thisStringPropertyand another arbitrary property.voidSet the wrapped value.voidunbindBidirectional(Object other) Remove a bidirectional binding between thisPropertyand another one.voidunbindBidirectional(Property<String> other) Removes a bidirectional binding between thisPropertyand another one.Methods declared in class StringExpression
concat, getValue, getValueSafe, greaterThan, greaterThan, greaterThanOrEqualTo, greaterThanOrEqualTo, isEmpty, isEqualTo, isEqualTo, isEqualToIgnoreCase, isEqualToIgnoreCase, isNotEmpty, isNotEqualTo, isNotEqualTo, isNotEqualToIgnoreCase, isNotEqualToIgnoreCase, isNotNull, isNull, length, lessThan, lessThan, lessThanOrEqualTo, lessThanOrEqualTo, stringExpressionModifier and TypeMethodDescriptionReturns aStringExpressionthat holds the value of thisStringExpressionconcatenated with anotherObject.getValue()Returns the current value of thisObservableValuefinal StringReturns usually the value of thisStringExpression.greaterThan(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than a constant value.greaterThan(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than anotherObservableStringValue.greaterThanOrEqualTo(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than or equal to a constant value.Creates a newBooleanBindingthat holdstrueif thisStringExpressionis greater than or equal to anotherObservableStringValue.isEmpty()isEqualTo(ObservableStringValue other) isEqualToIgnoreCase(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis equal to a constant value ignoring case.Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare equal ignoring case.isNotEqualTo(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis not equal to a constant value.Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare not equal.isNotEqualToIgnoreCase(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis not equal to a constant value ignoring case.Creates a newBooleanBindingthat holdstrueif this and anotherObservableStringValueare not equal ignoring case.isNull()length()Creates a newIntegerBindingthat holds the length of thisStringExpression.Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than a constant value.lessThan(ObservableStringValue other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than anotherObservableStringValue.lessThanOrEqualTo(String other) Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than or equal to a constant value.Creates a newBooleanBindingthat holdstrueif thisStringExpressionis less than or equal to anotherObservableStringValue.static StringExpressionstringExpression(ObservableValue<?> value) Returns aStringExpressionthat wraps aObservableValue.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 String, ? 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<String> Returns anObservableValuethat holds this value, or the given constant if it isnull.default Subscriptionsubscribe(BiConsumer<? super String, ? super String> 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<String> when(ObservableValue<Boolean> condition) Returns anObservableValuethat holds this value and is updated only whenconditionholdstrue.Methods declared in interface WritableValue
getValue
-
Constructor Details
-
SimpleStyleableStringProperty
The constructor of theSimpleStyleableStringProperty.- Parameters:
cssMetaData- the CssMetaData associated with thisStyleableProperty
-
SimpleStyleableStringProperty
public SimpleStyleableStringProperty(CssMetaData<? extends Styleable, String> cssMetaData, String initialValue) The constructor of theSimpleStyleableStringProperty.- Parameters:
cssMetaData- the CssMetaData associated with thisStyleablePropertyinitialValue- the initial value of the wrappedObject
-
SimpleStyleableStringProperty
public SimpleStyleableStringProperty(CssMetaData<? extends Styleable, String> cssMetaData, Object bean, String name) The constructor of theSimpleStyleableStringProperty.- Parameters:
cssMetaData- the CssMetaData associated with thisStyleablePropertybean- the bean of thisStringPropertyname- the name of thisStringProperty
-
SimpleStyleableStringProperty
public SimpleStyleableStringProperty(CssMetaData<? extends Styleable, String> cssMetaData, Object bean, String name, String initialValue) The constructor of theSimpleStyleableStringProperty.- Parameters:
cssMetaData- the CssMetaData associated with thisStyleablePropertybean- the bean of thisStringPropertyname- the name of thisStringPropertyinitialValue- the initial value of the wrappedObject
-
-
Method Details
-
getBean
Returns theObjectthat contains this property. If this property is not contained in anObject,nullis returned.- Returns:
- the containing
Objectornull
-
getName
Returns the name of this property. If the property does not have a name, this method returns an emptyString.- Returns:
- the name or an empty
String
-
getCssMetaData
Reflect back the CssMetaData that corresponds to thisjavafx.beans.property.StyleableProperty- Returns:
- the corresponding CssMetaData
-