Top Description Inners Fields Constructors Methods
javafx.css

public Class StyleablePropertyFactory<S extends Styleable>

extends Object
Class Inheritance
Type Parameters
<S>
The type of Styleable
Imports
javafx.css.converter.EnumConverter, javafx.beans.property.Property, javafx.geometry.Insets, javafx.scene.effect.Effect, javafx.scene.paint.Color, .Paint, javafx.scene.text.Font, javafx.util.Duration, .Pair, java.util.ArrayList, .Collections, .HashMap, .List, .Map, .NoSuchElementException, java.util.function.Function

Methods for creating instances of StyleableProperty with corresponding CssMetaData created behind the scenes. These methods greatly reduce the amount of boiler-plate code needed to implement the StyleableProperty and CssMetaData. These methods take a Function<? extends Styleable, StyleableProperty<?>> which returns a reference to the property itself. See the example below. Note that for efficient use of memory and for better CSS performance, creating the StyleablePropertyFactory as a static member, as shown below, is recommended.

public final class MyButton extends Button {

    private static final StyleablePropertyFactory<MyButton> FACTORY = new StyleablePropertyFactory<>(Button.getClassCssMetaData());

    MyButton(String labelText) {
        super(labelText);
        getStyleClass().add("my-button");
    }

    // Typical JavaFX property implementation
    public ObservableValue<Boolean> selectedProperty() { return (ObservableValue<Boolean>)selected; }
    public final boolean isSelected() { return selected.getValue(); }
    public final void setSelected(boolean isSelected) { selected.setValue(isSelected); }

    // StyleableProperty implementation reduced to one line
    private final StyleableProperty<Boolean> selected =
        FACTORY.createStyleableBooleanProperty(this, "selected", "-my-selected", s -> s.selected);

    @Override
    public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
        return FACTORY.getCssMetaData();
    }

}

The example above is the simplest use of StyleablePropertyFactory. But, this use does not provide the static CssMetaData that is useful for getClassCssMetaData(), which is described in the javadoc for CssMetaData. Static CssMetaData can, however, be created via StyleablePropertyFactory methods and will be returned by the methods which create StyleableProperty instances, as the example below illustrates. Note that the static method getClassCssMetaData() is a convention used throughout the JavaFX code base but the getClassCssMetaData() method itself is not used at runtime.


public final class MyButton extends Button {

    private static final StyleablePropertyFactory<MyButton> FACTORY =
        new StyleablePropertyFactory<>(Button.getClassCssMetaData());

    private static final CssMetaData<MyButton, Boolean> SELECTED =
        FACTORY.createBooleanCssMetaData("-my-selected", s -> s.selected, false, false);

    MyButton(String labelText) {
        super(labelText);
        getStyleClass().add("my-button");
    }

    // Typical JavaFX property implementation
    public ObservableValue<Boolean> selectedProperty() { return (ObservableValue<Boolean>)selected; }
    public final boolean isSelected() { return selected.getValue(); }
    public final void setSelected(boolean isSelected) { selected.setValue(isSelected); }

    // StyleableProperty implementation reduced to one line
    private final StyleableProperty<Boolean> selected =
        new SimpleStyleableBooleanProperty(SELECTED, this, "selected");

    public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
        return FACTORY.getCssMetaData();
    }

    @Override
    public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
        return FACTORY.getCssMetaData();
    }
}

The same can be accomplished with an inner-class. The previous example called new SimpleStyleableBooleanProperty to create the selected property. This example uses the factory to access the CssMetaData that was created along with the anonymous inner-class. For all intents and purposes, the two examples are the same.


public final class MyButton extends Button {

    private static CssMetaData<MyButton, Boolean> SELECTED;

    private static final StyleablePropertyFactory<MyButton> FACTORY =
        new StyleablePropertyFactory<>(Button.getClassCssMetaData()) {
        {
            SELECTED = createBooleanCssMetaData("-my-selected", s -> s.selected, false, false);
        }
    };


    MyButton(String labelText) {
        super(labelText);
        getStyleClass().add("my-button");
    }

    // Typical JavaFX property implementation
    public ObservableValue<Boolean> selectedProperty() { return (ObservableValue<Boolean>)selected; }
    public final boolean isSelected() { return selected.getValue(); }
    public final void setSelected(boolean isSelected) { selected.setValue(isSelected); }

    // StyleableProperty implementation reduced to one line
    private final StyleableProperty<Boolean> selected =
        new SimpleStyleableBooleanProperty(SELECTED, "selected", "my-selected");

    public static List<CssMetaData<? extends Styleable, ?>> getClassCssMetaData() {
        return FACTORY.getCssMetaData();
    }

    @Override
    public List<CssMetaData<? extends Styleable, ?>> getControlCssMetaData() {
        return FACTORY.getCssMetaData();
    }
}

Caveats:

The only option for creating a StyleableProperty with a number value is to create a StyleableProperty<Number>. The return value from the getValue() method of the StyleableProperty is a Number. Therefore, the get method of the JavaFX property needs to call the correct value method for the return type. For example,
public ObservableValue<Double> offsetProperty() { return (ObservableValue<Double>)offset; }
    public Double getOffset() { return offset.getValue().doubleValue(); }
    public void setOffset(Double value) { offset.setValue(value); }
    private final StyleableProperty<Number> offset = FACTORY.createStyleableNumberProperty(this, "offset", "-my-offset", s -> ((MyButton)s).offset);
Since
JavaFX 8u40

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final List<CssMetaData<? extends Styleable, ?>>
private final Map<String, Pair<Class<T>, CssMetaData<S, ?>>>
private final List<CssMetaData<? extends Styleable, ?>>

Constructor Summary

AccessConstructor and Description
public
StyleablePropertyFactory(List<CssMetaData<? extends Styleable, ?>>
The CssMetaData of the parent class of <S>, or null.
parentCssMetaData
)

The constructor is passed the CssMetaData of the parent class of <S>, typically by calling the static getClassCssMetaData() method of the parent.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
public final CssMetaData<S, Boolean>

Returns:

a CssMetaData created with initial value, and inherit flag
createBooleanCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Boolean>>
A function that returns the StyleableProperty<Boolean> that corresponds to this CssMetaData.
function
,
final boolean
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, Boolean> with initial value, and inherit flag.

public final CssMetaData<S, Boolean>

Returns:

a CssMetaData created with initial value, and false inherit flag
createBooleanCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Boolean>>
A function that returns the StyleableProperty<Boolean> that corresponds to this CssMetaData.
function
,
final boolean
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, Boolean> with initial value, and inherit flag defaulting to false.

public final CssMetaData<S, Boolean>

Returns:

a CssMetaData created with false initial value, and false inherit flag
createBooleanCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Boolean>>
A function that returns the StyleableProperty<Boolean> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, Boolean> with initial value and inherit flag both defaulting to false.

public final CssMetaData<S, Color>

Returns:

a CssMetaData created with initial value, and inherit flag
createColorCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Color>>
A function that returns the StyleableProperty<Color> that corresponds to this CssMetaData.
function
,
final Color
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, Color> with initial value, and inherit flag.

public final CssMetaData<S, Color>

Returns:

a CssMetaData created with initial value, and false inherit flag
createColorCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Color>>
A function that returns the StyleableProperty<Color> that corresponds to this CssMetaData.
function
,
final Color
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, Color> with initial value, and inherit flag defaulting to false.

public final CssMetaData<S, Color>

Returns:

a CssMetaData created with initial value, and false inherit flag
createColorCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Color>>
A function that returns the StyleableProperty<Color> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, Color> with initial value of Color.BLACK, and inherit flag defaulting to false.

public final CssMetaData<S, Duration>

Returns:

a CssMetaData created with initial value, and inherit flag
createDurationCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Duration>>
A function that returns the StyleableProperty<Duration> that corresponds to this CssMetaData.
function
,
final Duration
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, Duration> with initial value, and inherit flag.

public final CssMetaData<S, Duration>

Returns:

a CssMetaData created with initial value, and false inherit flag
createDurationCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Duration>>
A function that returns the StyleableProperty<Duration> that corresponds to this CssMetaData.
function
,
final Duration
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, Duration> with initial value, and inherit flag defaulting to false.

public final CssMetaData<S, Duration>

Returns:

a CssMetaData created with initial value, and false inherit flag
createDurationCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Duration>>
A function that returns the StyleableProperty<Duration> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, Duration> with initial value of Duration.BLACK, and inherit flag defaulting to false.

public final <
The CssMetaData created with initial value and inherit flag
E extends Effect
>
CssMetaData<S, E>

Returns:

a CssMetaData created with initial value, and inherit flag
createEffectCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<Effect> that corresponds to this CssMetaData.
function
,
final E
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, Effect> with initial value, and inherit flag.

public final <
The CssMetaData created with initial value and false inherit flag
E extends Effect
>
CssMetaData<S, E>

Returns:

a CssMetaData created with initial value, and false inherit flag
createEffectCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<Effect> that corresponds to this CssMetaData.
function
,
final E
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, Effect> with initial value, and inherit flag defaulting to false.

public final <
The CssMetaData created with null initial value and false inherit flag
E extends Effect
>
CssMetaData<S, E>

Returns:

a CssMetaData created with null initial value, and false inherit flag
createEffectCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<Effect> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, Effect> with initial value of null, and inherit flag defaulting to false.

public final <
The CssMetaData created with initial value and inherit flag
E extends Enum<E>
>
CssMetaData<S, E>

Returns:

a CssMetaData created with initial value, and inherit flag
createEnumCssMetaData
(Class<? extends Enum<E extends Enum<E>>>
The Enum class that is the type of the CssMetaData<E extends Enum<E>>.
enumClass
,
final String
The CSS property name.
property
,
final Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<Enum> that corresponds to this CssMetaData.
function
,
final E
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, Enum> with initial value, and inherit flag.

public final <
The CssMetaData created with initial value and false inherit flag
E extends Enum<E>
>
CssMetaData<S, E>

Returns:

a CssMetaData created with initial value, and false inherit flag
createEnumCssMetaData
(Class<? extends Enum<E extends Enum<E>>>
The Enum class that is the type of the CssMetaData<E extends Enum<E>>.
enumClass
,
final String
The CSS property name.
property
,
final Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<Enum> that corresponds to this CssMetaData.
function
,
final E
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, Enum> with initial value, and inherit flag defaulting to false.

public final <
The CssMetaData created with null initial value and false inherit flag
E extends Enum<E>
>
CssMetaData<S, E>

Returns:

a CssMetaData created with null initial value, and false inherit flag
createEnumCssMetaData
(Class<? extends Enum<E extends Enum<E>>>
The Enum class that is the type of the CssMetaData<E extends Enum<E>>.
enumClass
,
final String
The CSS property name.
property
,
final Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<Enum> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, Enum> with initial value of null, and inherit flag defaulting to false.

public final CssMetaData<S, Font>

Returns:

a CssMetaData created with initial value, and inherit flag
createFontCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Font>>
A function that returns the StyleableProperty<Font> that corresponds to this CssMetaData.
function
,
final Font
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, Font> with initial value, and inherit flag.

public final CssMetaData<S, Font>

Returns:

a CssMetaData created with initial value, and true inherit flag
createFontCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Font>>
A function that returns the StyleableProperty<Font> that corresponds to this CssMetaData.
function
,
final Font
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, Font> with initial value, and inherit flag defaulting to true.

public final CssMetaData<S, Font>

Returns:

a CssMetaData created with initial value, and true inherit flag
createFontCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Font>>
A function that returns the StyleableProperty<Font> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, Font> with initial value of javafx.scene.text.Font#getDefault(), and inherit flag defaulting to true.

public final CssMetaData<S, Insets>

Returns:

a CssMetaData created with initial value, and inherit flag
createInsetsCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Insets>>
A function that returns the StyleableProperty<Insets> that corresponds to this CssMetaData.
function
,
final Insets
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, Insets> with initial value, and inherit flag.

public final CssMetaData<S, Insets>

Returns:

a CssMetaData created with initial value, and false inherit flag
createInsetsCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Insets>>
A function that returns the StyleableProperty<Insets> that corresponds to this CssMetaData.
function
,
final Insets
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, Insets> with initial value, and inherit flag defaulting to false.

public final CssMetaData<S, Insets>

Returns:

a CssMetaData created with initial value, and false inherit flag
createInsetsCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Insets>>
A function that returns the StyleableProperty<Insets> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, Insets> with initial value of Insets#EMPTY, and inherit flag defaulting to false.

public final CssMetaData<S, Paint>

Returns:

a CssMetaData created with initial value, and inherit flag
createPaintCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Paint>>
A function that returns the StyleableProperty<Paint> that corresponds to this CssMetaData.
function
,
final Paint
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, Paint> with initial value, and inherit flag.

public final CssMetaData<S, Paint>

Returns:

a CssMetaData created with initial value, and false inherit flag
createPaintCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Paint>>
A function that returns the StyleableProperty<Paint> that corresponds to this CssMetaData.
function
,
final Paint
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, Paint> with initial value, and inherit flag defaulting to false.

public final CssMetaData<S, Paint>

Returns:

a CssMetaData created with initial value, and false inherit flag
createPaintCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Paint>>
A function that returns the StyleableProperty<Paint> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, Paint> with initial value of Color.BLACK, and inherit flag defaulting to false.

public final CssMetaData<S, Number>

Returns:

a CssMetaData created with initial value, and inherit flag
createSizeCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Number>>
A function that returns the StyleableProperty<Number> that corresponds to this CssMetaData.
function
,
final Number
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, Number> with initial value, and inherit flag.

public final CssMetaData<S, Number>

Returns:

a CssMetaData created with initial value, and false inherit flag
createSizeCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Number>>
A function that returns the StyleableProperty<Number> that corresponds to this CssMetaData.
function
,
final Number
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, Number> with initial value, and inherit flag defaulting to false.

public final CssMetaData<S, Number>

Returns:

a CssMetaData created with initial value, and false inherit flag
createSizeCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<Number>>
A function that returns the StyleableProperty<Number> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, Number> with initial value of 0d, and inherit flag defaulting to false.

public final CssMetaData<S, String>

Returns:

a CssMetaData created with initial value, and inherit flag
createStringCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that corresponds to this CssMetaData.
function
,
final String
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, String> with initial value, and inherit flag.

public final CssMetaData<S, String>

Returns:

a CssMetaData created with initial value, and false inherit flag
createStringCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that corresponds to this CssMetaData.
function
,
final String
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, String> with initial value, and inherit flag defaulting to false.

public final CssMetaData<S, String>

Returns:

a CssMetaData created with null initial value, and false inherit flag
createStringCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, String> with initial value of null, and inherit flag defaulting to false.

public final StyleableProperty<Boolean>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableBooleanProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Boolean>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Boolean>>
A function that returns the StyleableProperty<Boolean> that was created by this method call.
function
,
boolean
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<Boolean> with initial value and inherit flag.

public final StyleableProperty<Boolean>

Returns:

a StyleableProperty created with initial value
createStyleableBooleanProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Boolean>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Boolean>>
A function that returns the StyleableProperty<Boolean> that was created by this method call.
function
,
boolean
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<Boolean> with initial value.

public final StyleableProperty<Boolean>

Returns:

a StyleableProperty created with default initialValue and inherit flag
createStyleableBooleanProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Boolean>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Boolean>>
A function that returns the StyleableProperty<Boolean> that was created by this method call.
function
)

Create a StyleableProperty<Boolean>.

public final StyleableProperty<Boolean>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleableBooleanProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Boolean>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<Boolean> using previously created CssMetaData for the given cssProperty.

public final StyleableProperty<Color>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableColorProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Color>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Color>>
A function that returns the StyleableProperty<Color> that was created by this method call.
function
,
Color
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<Color> with initial value and inherit flag.

public final StyleableProperty<Color>

Returns:

a StyleableProperty created with initial value
createStyleableColorProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Color>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Color>>
A function that returns the StyleableProperty<Color> that was created by this method call.
function
,
Color
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<Color> with initial value.

public final StyleableProperty<Color>

Returns:

a StyleableProperty created with default initial value and inherit flag
createStyleableColorProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Color>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Color>>
A function that returns the StyleableProperty<Color> that was created by this method call.
function
)

Create a StyleableProperty<Color>.

public final StyleableProperty<Color>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleableColorProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Color>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<Color> using previously created CssMetaData for the given cssProperty.

public final StyleableProperty<Duration>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableDurationProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Duration>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Duration>>
A function that returns the StyleableProperty<Duration> that was created by this method call.
function
,
Duration
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<Duration> with initial value and inherit flag.

public final StyleableProperty<Duration>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleableDurationProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Duration>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Duration>>
A function that returns the StyleableProperty<Duration> that was created by this method call.
function
,
Duration
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<Duration> with initial value.

public final StyleableProperty<Duration>

Returns:

a StyleableProperty created with default initial value and false inherit flag
createStyleableDurationProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Duration>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Duration>>
A function that returns the StyleableProperty<Duration> that was created by this method call.
function
)

Create a StyleableProperty<Duration>.

public final StyleableProperty<Duration>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleableDurationProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Duration>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<Duration> using previously created CssMetaData for the given cssProperty.

public final <
The type of StyleableProperty
E extends Effect
>
StyleableProperty<E>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableEffectProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Effect>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<Effect> that was created by this method call.
function
,
E
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<Effect> with initial value and inherit flag.

public final <
The StyleableProperty created with initial value and false inherit flag
E extends Effect
>
StyleableProperty<E>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleableEffectProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Effect>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<Effect> that was created by this method call.
function
,
E
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<Effect> with initial value.

public final <
The StyleableProperty created with null initial value and false inherit flag
E extends Effect
>
StyleableProperty<E>

Returns:

a StyleableProperty created with null initial value and false inherit flag
createStyleableEffectProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Effect>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<Effect> that was created by this method call.
function
)

Create a StyleableProperty<Effect>.

public final StyleableProperty<Effect>

Returns:

StyleableProperty created using previously created CssMetaData for the given cssProperty
createStyleableEffectProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Effect>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<Effect> using previously created CssMetaData for the given cssProperty.

public final <
The StyleableProperty created using previously created CssMetaData
E extends Enum<E>
>
StyleableProperty<E>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleableEffectProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<E extends Enum<E>>
propertyName
,
String
The CSS property name
cssProperty
,
Class<E>
The Enum class that is the type of the StyleableProperty<E extends Enum<E>>.
enumClass
)

Create a StyleableProperty<E extends Enum<E>> using previously created CssMetaData for the given cssProperty.

public final <
The StyleableProperty created with initial value and inherit flag
E extends Enum<E>
>
StyleableProperty<E>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableEnumProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<E extends Enum<E>>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<E extends Enum<E>> that was created by this method call.
function
,
Class<E>
The Enum class that is the type of the StyleableProperty<E extends Enum<E>>.
enumClass
,
E
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<E extends Enum<E>> with initial value and inherit flag.

public final <
The StyleableProperty created with initial value and false inherit flag
E extends Enum<E>
>
StyleableProperty<E>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleableEnumProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<E extends Enum<E>>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<E extends Enum<E>> that was created by this method call.
function
,
Class<E>
The Enum class that is the type of the StyleableProperty<E extends Enum<E>>.
enumClass
,
E
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<E extends Enum<E>> with initial value.

public final <
The StyleableProperty created with null initial value and false inherit flag
E extends Enum<E>
>
StyleableProperty<E>

Returns:

a StyleableProperty created with null initial value and false inherit flag
createStyleableEnumProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<E extends Enum<E>>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<E>>
A function that returns the StyleableProperty<E extends Enum<E>> that was created by this method call.
function
,
Class<E>
The Enum class that is the type of the StyleableProperty<E extends Enum<E>>.
enumClass
)

Create a StyleableProperty<E extends Enum<E>>.

public final StyleableProperty<Font>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableFontProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Font>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Font>>
A function that returns the StyleableProperty<Font> that was created by this method call.
function
,
Font
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<Font> with initial value and inherit flag.

public final StyleableProperty<Font>

Returns:

a StyleableProperty created with initial value and true inherit flag
createStyleableFontProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Font>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Font>>
A function that returns the StyleableProperty<Font> that was created by this method call.
function
,
Font
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<Font> with initial value.

public final StyleableProperty<Font>

Returns:

a StyleableProperty created with default font initial value and true inherit flag
createStyleableFontProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Font>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Font>>
A function that returns the StyleableProperty<Font> that was created by this method call.
function
)

Create a StyleableProperty<Font>.

public final StyleableProperty<Font>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleableFontProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Font>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<Font> using previously created CssMetaData for the given cssProperty.

public final StyleableProperty<Insets>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableInsetsProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Inset>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Insets>>
A function that returns the StyleableProperty<Inset> that was created by this method call.
function
,
Insets
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<Inset> with initial value and inherit flag.

public final StyleableProperty<Insets>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleableInsetsProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Inset>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Insets>>
A function that returns the StyleableProperty<Inset> that was created by this method call.
function
,
Insets
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<Inset> with initial value.

public final StyleableProperty<Insets>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleableInsetsProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Inset>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Insets>>
A function that returns the StyleableProperty<Inset> that was created by this method call.
function
)

Create a StyleableProperty<Inset>.

public final StyleableProperty<Insets>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleableInsetsProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Insets>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<Insets> using previously created CssMetaData for the given cssProperty.

public final StyleableProperty<Number>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableNumberProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Number>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Number>>
A function that returns the StyleableProperty<Number> that was created by this method call.
function
,
Number
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<Number> with initial value and inherit flag.

public final StyleableProperty<Number>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleableNumberProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Number>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Number>>
A function that returns the StyleableProperty<Number> that was created by this method call.
function
,
Number
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<Number> with initial value.

public final StyleableProperty<Number>

Returns:

a StyleableProperty created with zero initial value and false inherit flag
createStyleableNumberProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Number>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Number>>
A function that returns the StyleableProperty<Number> that was created by this method call.
function
)

Create a StyleableProperty<Number>.

public final StyleableProperty<Number>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleableNumberProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Number>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<Number> using previously created CssMetaData for the given cssProperty.

public final StyleableProperty<Paint>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleablePaintProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Paint>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Paint>>
A function that returns the StyleableProperty<Paint> that was created by this method call.
function
,
Paint
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<Paint> with initial value and inherit flag.

public final StyleableProperty<Paint>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleablePaintProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Paint>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Paint>>
A function that returns the StyleableProperty<Paint> that was created by this method call.
function
,
Paint
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<Paint> with initial value.

public final StyleableProperty<Paint>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleablePaintProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Paint>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<Paint>>
A function that returns the StyleableProperty<Paint> that was created by this method call.
function
)

Create a StyleableProperty<Paint>.

public final StyleableProperty<Paint>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleablePaintProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<Paint>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<Paint> using previously created CssMetaData for the given cssProperty.

public final StyleableProperty<String>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableStringProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<String>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that was created by this method call.
function
,
String
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<String> with initial value and inherit flag.

public final StyleableProperty<String>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleableStringProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<String>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that was created by this method call.
function
,
String
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<String> with initial value.

public final StyleableProperty<String>

Returns:

a StyleableProperty created with null initial value and false inherit flag
createStyleableStringProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<String>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that was created by this method call.
function
)

Create a StyleableProperty<String>.

public final StyleableProperty<String>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleableStringProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<String>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<String> using previously created CssMetaData for the given cssProperty.

public final StyleableProperty<String>

Returns:

a StyleableProperty created with initial value and inherit flag
createStyleableUrlProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<String>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that was created by this method call.
function
,
String
The initial value of the property. CSS may reset the property to this value.
initialValue
,
boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a StyleableProperty<String> with initial value and inherit flag.

public final StyleableProperty<String>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleableUrlProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<String>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that was created by this method call.
function
,
String
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a StyleableProperty<String> with initial value.

public final StyleableProperty<String>

Returns:

a StyleableProperty created with initial value and false inherit flag
createStyleableUrlProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<String>
propertyName
,
String
The CSS property name
cssProperty
,
Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that was created by this method call.
function
)

Create a StyleableProperty<String> with initial value.

public final StyleableProperty<String>

Returns:

a StyleableProperty created using previously created CssMetaData
createStyleableUrlProperty
(S
The this reference of the returned property. This is also the property bean.
styleable
,
String
The field name of the StyleableProperty<String>
propertyName
,
String
The CSS property name
cssProperty
)

Create a StyleableProperty<String> using previously created CssMetaData for the given cssProperty.

public final CssMetaData<S, String>

Returns:

a CssMetaData created with initial value, and inherit flag
createUrlCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that corresponds to this CssMetaData.
function
,
final String
The initial value of the property. CSS may reset the property to this value.
initialValue
,
final boolean
Whether or not the CSS style can be inherited by child nodes
inherits
)

Create a CssMetaData<S, String> with initial value, and inherit flag.

public final CssMetaData<S, String>

Returns:

a CssMetaData created with initial value, and false inherit flag
createUrlCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that corresponds to this CssMetaData.
function
,
final String
The initial value of the property. CSS may reset the property to this value.
initialValue
)

Create a CssMetaData<S, String> with initial value, and inherit flag defaulting to false.

public final CssMetaData<S, String>

Returns:

a CssMetaData created with null initial value, and false inherit flag
createUrlCssMetaData
(final String
The CSS property name.
property
,
final Function<S, StyleableProperty<String>>
A function that returns the StyleableProperty<String> that corresponds to this CssMetaData.
function
)

Create a CssMetaData<S, String> with initial value of null, and inherit flag defaulting to false.

public final List<CssMetaData<? extends Styleable, ?>>

Returns:

the CssMetaData for the given Styleable
getCssMetaData
()

Get the CssMetaData for the given Styleable.

private CssMetaData<S, ?>
getCssMetaData(final Class<T> ofClass, String property)

private CssMetaData<S, ?>
getCssMetaData(final Class<T> ofClass, String property, final Function<String, CssMetaData<S, ?>> createFunction)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait