public abstract class StyleableObjectProperty<T> extends ObjectPropertyBase<T> implements StyleableProperty<T>
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
,
style‑able by CSS.ObjectPropertyBase
,
CssMetaData
,
StyleableProperty
Constructor and Description |
---|
StyleableObjectProperty()
The constructor of the
StyleableObjectProperty . |
StyleableObjectProperty(T initialValue)
The constructor of the
StyleableObjectProperty . |
Modifier and Type | Method and Description |
---|---|
void |
applyStyle(StyleOrigin origin,
T v)
This method is called from CSS code to set the value of the property.
|
void |
bind(ObservableValue<? extends T> observable)
Create a unidirection binding for this
Property . |
StyleOrigin |
getStyleOrigin()
Tells the origin of the value of the property.
|
void |
set(T v)
Set the wrapped value.
|
addListener, addListener, fireValueChangedEvent, get, invalidated, isBound, removeListener, removeListener, toString, unbind
bindBidirectional, setValue, unbindBidirectional
asString, asString, asString, getValue, isEqualTo, isEqualTo, isNotEqualTo, isNotEqualTo, isNotNull, isNull, objectExpression
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCssMetaData
getValue, setValue
getBean, getName
getValue
public StyleableObjectProperty()
StyleableObjectProperty
.public StyleableObjectProperty(T initialValue)
StyleableObjectProperty
.initialValue
- the initial value of the wrapped Object
public void applyStyle(StyleOrigin origin, T v)
applyStyle
in interface StyleableProperty<T>
public void bind(ObservableValue<? extends T> observable)
Property
.
Note that JavaFX has all the bind calls implemented through weak listeners. This means the bound property can be garbage collected and stopped from being updated.
public void set(T v)
WritableValue.setValue(java.lang.Object)
set
in interface WritableObjectValue<T>
set
in class ObjectPropertyBase<T>
v
- The new valueWritableObjectValue.get()
public StyleOrigin getStyleOrigin()
getStyleOrigin
in interface StyleableProperty<T>
Copyright (c) 2008, 2015, Oracle and/or its affiliates. All rights reserved.