public abstract class StyleableAdditionBase extends Object
Regions and Controls to share a base class which responsible to style a Node,
so there is no need to have the same code twice. Usually an instance of this class will be created within the Skin or Region it should be
used by. Then the region calls the getClassCssMetaData()s, which will provide the list of CssMetaData that can be styled for this class.| Constructor and Description |
|---|
StyleableAdditionBase() |
| Modifier and Type | Method and Description |
|---|---|
static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> |
getClassCssMetaData()
This methods need to be provided in any class extending a
StyleableAdditionBase. |
static <TStyleableAddition extends StyleableAdditionBase> |
getStyleableAddition(javafx.css.Styleable styleable,
Class<TStyleableAddition> clazz)
Returns the
StyleableAdditionBase from the given Styleable using the given clazz. |
public static <TStyleableAddition extends StyleableAdditionBase> TStyleableAddition getStyleableAddition(javafx.css.Styleable styleable, Class<TStyleableAddition> clazz)
StyleableAdditionBase from the given Styleable using the given clazz. This method is supposed to be used inside a CssMetaData of a
StyleableAdditionBase and ensured that the StyleableAdditionBase is found on the Styleable which used the StyleableAdditionBase.
The way this method works is that it checks if the passed Styleable is a IStyleableAdditionProvider, if so the desired StyleableAdditionBase is requested from the
IStyleableAdditionProvider. If the StyleableAdditionBase was not found this way, it is possible that the Styleable is a Control. In this case the
Skin is checked the same way.TStyleableAddition - type of the styleable addition.styleable - Styleable to use.clazz - class to use.StyleableAdditionBase from the Styleable.IllegalArgumentException - if either Styleable or Class is null or the desired StyleableAdditionBase was not found on the Styleable.public static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getClassCssMetaData()
StyleableAdditionBase. The sole purpose of the method in the StyleableAdditionBase is to provide an recommendation
for the name to use, as such this method will only return an empty ArrayList.ArrayList.Copyright © 2017 Saxonia Systems AG. All rights reserved.