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:
CssMetaDataStyleableProperty.
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.StyleablePropertyCssMetaData that
corresponds to the property. The StyleablePropertyFactory
greatly simplifies creating a StyleableProperty and its corresponding CssMetaData.PseudoClasspseudoClassStateChanged. For further information about CSS, how to apply CSS styles to nodes, and what properties are available for styling, see the CSS Reference Guide.
| Modifier and Type | Interface and Description |
|---|---|
| public interface | Styleable
Styleable comprises the minimal interface required for an object to be styled by CSS. |
| public interface | StyleableProperty<
the specific property T>StyleableProperty allows a |
| Modifier and Type | Class and Description |
|---|---|
| pack-priv class | |
| public abstract class | CssMetaData<
The type of Styleable S extends Styleable, The type into which the parsed value is converted. V>A CssMetaData instance provides information about the CSS style and provides the hooks that allow CSS to set a property value. |
| public class | CssParser
A parser for a CSS document string. |
| public class | Declaration
This class serves as a container of a CSS property and its value. |
| public abstract class | FontCssMetaData<
The type of Styleable S extends Styleable>An partial implementation of CssMetaData for Font properties which includes the font sub-properties: weight, style, family and size. |
| public abstract class | FontFace
A FontFace is a @font-face definition from CSS file |
| public class | |
| public class | ParsedValue<
the type of the parsed value V, the type of the converted value T>A representation of a parsed CSS value. |
| public abstract class | PseudoClass
PseudoClass represents one unique pseudo-class state. |
| public class | Rule
A Rule is a collection of CSS |
| public abstract class | Selector
Used by |
| public class | SimpleStyleableBooleanProperty
This class extends |
| public class | SimpleStyleableDoubleProperty
This class extends |
| public class | SimpleStyleableFloatProperty
This class extends |
| public class | SimpleStyleableIntegerProperty
This class extends |
| public class | SimpleStyleableLongProperty
This class extends |
| public class | SimpleStyleableObjectProperty<
the property value type T>This class extends |
| public class | SimpleStyleableStringProperty
This class extends |
| public class | Size
Represents a size specified in a particular unit, such as 14px or 0.2em. |
| public class | Style
A Style is just the selector and declaration from a Rule. |
| public abstract class | StyleableBooleanProperty
This class extends |
| public abstract class | StyleableDoubleProperty
This class extends |
| public abstract class | StyleableFloatProperty
This class extends |
| public abstract class | StyleableIntegerProperty
This class extends |
| public abstract class | StyleableLongProperty
This class extends |
| public abstract class | StyleableObjectProperty<
the property value type T>This class extends |
| public class | StyleablePropertyFactory<
The type of Styleable S extends Styleable>Methods for creating instances of StyleableProperty with corresponding CssMetaData created behind the scenes. |
| public abstract class | StyleableStringProperty
This class extends |
| public class | StyleClass
A class that contains |
| public class | StyleConverter<
the type of the parsed value F, the converted type of the ParsedValueImpl T>StyleConverter converts |
| public class | Stylesheet
A stylesheet which can apply properties to a tree of objects. |
| public class | TransitionEvent
An event that signals the creation, beginning, completion and cancellation of implicit CSS transitions. |
| Modifier and Type | Enum and Description |
|---|---|
| public enum | SizeUnits
Represents a size specified in a particular unit, such as 14px or 0.2em. |
| public enum | StyleOrigin
Enumeration of the possible source or origin of a stylesheet and styles. |