Top Description Methods
javafx.css

public Interface StyleableProperty<T>

extends WritableValue<T>
Known Direct Implementers
javafx.css.StyleableStringProperty, javafx.scene.Node.TransitionDefinitionCollection, javafx.css.StyleableBooleanProperty, javafx.css.StyleableDoubleProperty, javafx.css.StyleableFloatProperty, javafx.css.StyleableIntegerProperty, javafx.css.StyleableLongProperty, javafx.css.StyleableObjectProperty
Type Parameters
<T>
the specific property
Imports
javafx.beans.value.WritableValue

StyleableProperty allows a javafx.beans.property to be styled from CSS.

This interface allows coordination between CSS processing and a javafx.beans.property. The implementation ensure that the priority for setting the value is, in increasing order and assuming equal importance:

  1. a style from a user agent stylesheet in javafx.application.Application#setUserAgentStylesheet(java.lang.String)
  2. value set from code, for example calling javafx.scene.Node#setOpacity(double)
  3. a style from an author stylesheet in javafx.scene.Scene#getStylesheets() or javafx.scene.Parent#getStylesheets()
  4. a style from javafx.scene.Node#setStyle(java.lang.String)
In addition to being styleable via CSS, a StyleableProperty implementation can opt to support implicit CSS transitions by extending one of the following classes:

StyleablePropertyFactory greatly simplifies creating a StyleableProperty and its corresponding CssMetaData. All properties created using StyleablePropertyFactory support implicit CSS transitions.

Since
JavaFX 8.0
See Also
javafx.css.StyleablePropertyFactory

Method Summary

Modifier and TypeMethod and Description
public void
applyStyle(StyleOrigin
the origin
origin
,
T
the value
value
)

This method is called from CSS code to set the value of the property.

public CssMetaData<? extends Styleable, T>

Returns:

the corresponding CssMetaData
getCssMetaData
()

Reflect back the CssMetaData that corresponds to this javafx.beans.property.StyleableProperty

public StyleOrigin

Returns:

the style origin
getStyleOrigin
()

Tells the origin of the value of the property.

Inherited from javafx.beans.value.WritableValue:
getValuesetValue

Method Detail

applyStyleback to summary
public void applyStyle(StyleOrigin origin, T value)

This method is called from CSS code to set the value of the property.

Parameters
origin:StyleOrigin

the origin

value:T

the value

getCssMetaDataback to summary
public CssMetaData<? extends Styleable, T> getCssMetaData()

Reflect back the CssMetaData that corresponds to this javafx.beans.property.StyleableProperty

Returns:CssMetaData<? extends Styleable, T>

the corresponding CssMetaData

getStyleOriginback to summary
public StyleOrigin getStyleOrigin()

Tells the origin of the value of the property. This is needed to determine whether or not CSS can override the value.

Returns:StyleOrigin

the style origin