Package javafx.css

Interface StyleableProperty<T>

Type Parameters:
T - the specific property
All Superinterfaces:
WritableValue<T>
All Known Implementing Classes:
SimpleStyleableBooleanProperty, SimpleStyleableDoubleProperty, SimpleStyleableFloatProperty, SimpleStyleableIntegerProperty, SimpleStyleableLongProperty, SimpleStyleableObjectProperty, SimpleStyleableStringProperty, StyleableBooleanProperty, StyleableDoubleProperty, StyleableFloatProperty, StyleableIntegerProperty, StyleableLongProperty, StyleableObjectProperty, StyleableStringProperty

public interface StyleableProperty<T> extends WritableValue<T>
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 Application.setUserAgentStylesheet(java.lang.String)
  2. value set from code, for example calling Node.setOpacity(double)
  3. a style from an author stylesheet in Scene.getStylesheets() or Parent.getStylesheets()
  4. a style from 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: