Package javafx.css


package javafx.css

Provides API for making properties styleable via CSS and for supporting pseudo-class state.

The JavaFX Scene Graph provides the facility to style nodes using CSS (Cascading Style Sheets). The Node class contains id, styleClass, and style variables which are used by CSS selectors to find nodes to which styles should be applied. The Scene class and Parent class contain a the stylesheets variable which is a list of URLs that reference CSS style sheets that are to be applied to the nodes within that scene or parent.

The primary classes in this package are:

CssMetaData
Defines the CSS property and provides a link back to the StyleableProperty. By convention, classes that have CssMetaData implement a public static List<CssMetaData<? extends Styleable>> getClassCssMetaData() method that allows other classes to include CssMetaData from an inherited class. The method getCssMetaData() should be overridden to return getClassCssMetaData(). The CSS implementation frequently calls getCssMetaData(). It is strongly recommended that the returned list be a final static.
StyleableProperty
Defines the interface that the CSS implementation uses to set values on a property and provides a link back to the CssMetaData that corresponds to the property. The StyleablePropertyFactory greatly simplifies creating a StyleableProperty and its corresponding CssMetaData.
PseudoClass
Defines a pseudo-class which can be set or cleared via the method pseudoClassStateChanged.

For further information about CSS, how to apply CSS styles to nodes, and what properties are available for styling, see the CSS Reference Guide.

  • Class
    Description
    CssMetaData<S extends Styleable,V>
    A CssMetaData instance provides information about the CSS style and provides the hooks that allow CSS to set a property value.
    A parser for a CSS document string.
    A class that encapsulates information about the source and nature of errors encountered while parsing CSS or applying styles to Nodes.
    Encapsulate errors arising from parsing of Node's style property
    Encapsulates errors arising from applying a style to a Node.
    Encapsulate errors arising from parsing when the style is not an in-line style nor is the style from a stylesheet.
    Encapsulate errors arising from parsing of stylesheet files
    This class serves as a container of a CSS property and its value.
    An partial implementation of CssMetaData for Font properties which includes the font sub-properties: weight, style, family and size.
    A FontFace is a @font-face definition from CSS file
    Used by Rule to determine whether or not the selector applies to a given object.
    A representation of a parsed CSS value.
    PseudoClass represents one unique pseudo-class state.
    A Rule is a collection of CSS Selectors and Declarations.
    Used by CSSRule to determine whether or not the Selector applies to a given object.
    This class extends SimpleBooleanProperty and provides a full implementation of a StyleableProperty.
    This class extends SimpleDoubleProperty and provides a full implementation of a StyleableProperty.
    This class extends SimpleFloatProperty and provides a full implementation of a StyleableProperty.
    This class extends SimpleIntegerProperty and provides a full implementation of a StyleableProperty.
    This class extends SimpleLongProperty and provides a full implementation of a StyleableProperty.
    This class extends SimpleObjectProperty and provides a full implementation of a StyleableProperty.
    This class extends SimpleStringProperty and provides a full implementation of a StyleableProperty.
    Represents a size specified in a particular unit, such as 14px or 0.2em.
    Represents a size specified in a particular unit, such as 14px or 0.2em.
    A Style is just the selector and declaration from a Rule.
    Styleable comprises the minimal interface required for an object to be styled by CSS.
    This class extends BooleanPropertyBase and provides a partial implementation of a StyleableProperty.
    This class extends DoublePropertyBase and provides a partial implementation of a StyleableProperty.
    This class extends FloatPropertyBase and provides a partial implementation of a StyleableProperty.
    This class extends IntegerPropertyBase and provides a partial implementation of a StyleableProperty.
    This class extends LongPropertyBase and provides a partial implementation of a StyleableProperty.
    This class extends ObjectPropertyBase and provides a partial implementation of a StyleableProperty.
    StyleableProperty allows a javafx.beans.property to be styled from CSS.
    Methods for creating instances of StyleableProperty with corresponding CssMetaData created behind the scenes.
    This class extends StringPropertyBase and provides a partial implementation of a StyleableProperty.
    A class that contains StyleClass information.
    StyleConverter converts ParsedValue<F,T> from type F to type T.
    The StringStore class.
    Enumeration of the possible source or origin of a stylesheet and styles.
    A stylesheet which can apply properties to a tree of objects.
    An event that signals the creation, beginning, completion and cancellation of implicit CSS transitions.