| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private CssStyleHelper. | |
| private static final CssMetaData | |
| private static final WeakReference | |
| private WeakReference | |
| private static final PlatformLogger | |
| private static final Set | |
| private boolean | |
| private boolean | |
| private final PseudoClassState | triggerStates
A Set of all the pseudo-class states which, if they change, need to cause the Node to be set to UPDATE its CSS styles on the next pulse. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private CalculatedValue | calculateValue(final CascadingStyle style, final Styleable styleable, final CssMetaData<S extends Styleable, V> cssMetaData, final StyleMap styleMap, final Set<PseudoClass> states, final Styleable originatingStyleable, final CalculatedValue fontFromCacheEntry)
|
| private static boolean | |
| private boolean | containsProperty(Map<String, List<CascadingStyle>> cascadingStyles, CssMetaData<? extends Styleable, ?> propertyMetadata)
Returns whether the cascading style map contains the specified property or any of its sub-properties. |
| pack-priv static CssStyleHelper | |
| pack-priv Font | deriveFont(Font font, String fontFamily, FontWeight fontWeight, FontPosture fontPosture, double fontSize)
|
| private static Node | |
| private String | formatExceptionMessage(Styleable styleable, CssMetaData<S extends Styleable, V> cssMetaData, Style style, Exception e)
|
| private String | formatUnresolvedLookupMessage(Styleable styleable, CssMetaData<S extends Styleable, V> cssMetaData, Style style, ParsedValue<V, T> resolved, ClassCastException cce)
|
| private CalculatedValue | |
| pack-priv String | |
| pack-priv FontPosture | |
| pack-priv FontWeight | |
| private CascadingStyle | getInheritedStyle(final Styleable styleable, final String property)
Called when we must getInheritedStyle a value from a parent node in the scenegraph. |
| private void | getMatchingLookupStyles(final Styleable node, final ParsedValue<V, T> parsedValue, final List<CascadingStyle> styleList, boolean matchState)
|
| pack-priv static List | getMatchingStyles(final Styleable styleable, final CssMetaData<S extends Styleable, V> styleableProperty)
Called from Node NodeHelper.getMatchingStyles |
| pack-priv static Map | |
| private List | getMatchingStyles(final Styleable node, final CssMetaData<S extends Styleable, V> styleableProperty, boolean matchState)
|
| private void | getMatchingStyles(final Styleable node, final CssMetaData<S extends Styleable, V> styleableProperty, final List<CascadingStyle> styleList, boolean matchState)
|
| private CascadingStyle | |
| private static CssStyleHelper | |
| private StyleMap | |
| private Set | |
| private String | |
| private CalculatedValue | handleNoStyleFound(final Styleable styleable, final CssMetaData<S extends Styleable, V> cssMetaData, final StyleMap styleMap, Set<PseudoClass> pseudoClassStates, Styleable originatingStyleable, final CalculatedValue cachedFont)
Called when there is no style found. |
| private static boolean | |
| private boolean | |
| private CalculatedValue | lookup(final Styleable styleable, final CssMetaData<S extends Styleable, V> cssMetaData, final StyleMap styleMap, final Set<PseudoClass> states, final Styleable originatingStyleable, final CalculatedValue cachedFont)
The main workhorse of this class, the lookup method walks up the CSS style tree looking for the style information for the Node, the property associated with the given styleable, in these states for this font. |
| pack-priv CalculatedValue | lookupFont(final Styleable styleable, final String property, final StyleMap styleMap, final CalculatedValue cachedFont)
Look up a font property. |
| private CascadingStyle | lookupInheritedFontProperty(final Styleable styleable, final String property, final StyleMap styleMap, final int distance, CascadingStyle fontShorthand)
|
| pack-priv boolean | |
| pack-priv void | |
| private void | resetToInitialValue(Styleable styleable, CssMetaData<S extends Styleable, V> metadata, CalculatedValue initialValue)
Resets the property to its initial value, but only if the property value is currently set by CSS;
that is, its style origin is either |
| private Map | Returns: the properties that remain set withnewStyleMapResets any properties on the given |
| private ParsedValue | resolveLookups(final Styleable styleable, final ParsedValue<V, T> parsedValue, final StyleMap styleMap, Set<PseudoClass> states, Set<ParsedValue<V, T>> resolves)
|
| private CascadingStyle | resolveRef(final Styleable styleable, final String property, final StyleMap styleMap, final Set<PseudoClass> states)
Find the property among the styles that pertain to the Node |
| private static void | |
| pack-priv void | transitionToState(final Node node)
Called by the Node whenever it has transitioned from one set of pseudo-class states to another. |
| private static void |
| cacheContainer | back to summary |
|---|---|
| private CssStyleHelper. | |
| dummyFontProperty | back to summary |
|---|---|
| private static final CssMetaData<S extends Styleable, V> dummyFontProperty | |
| EMPTY_NODE | back to summary |
|---|---|
| private static final WeakReference<Node> EMPTY_NODE | |
| firstStyleableAncestor | back to summary |
|---|---|
| private WeakReference<Node> firstStyleableAncestor | |
| LOGGER | back to summary |
|---|---|
| private static final PlatformLogger LOGGER | |
| NULL_PSEUDO_CLASS_STATE | back to summary |
|---|---|
| private static final Set<PseudoClass> NULL_PSEUDO_CLASS_STATE | |
| resetInProgress | back to summary |
|---|---|
| private boolean resetInProgress | |
| transitionStateInProgress | back to summary |
|---|---|
| private boolean transitionStateInProgress | |
| triggerStates | back to summary |
|---|---|
| private final PseudoClassState triggerStates A Set of all the pseudo-class states which, if they change, need to cause the Node to be set to UPDATE its CSS styles on the next pulse. For example, your stylesheet might have:
In this case, the first 2 rules apply to the Button itself, but the
second two rules apply to the label within a Button. When the hover
changes on the Button, however, we must mark the Button as needing
an UPDATE. StyleHelper though only contains styles for the first two
rules for Button. The pseudoclassStateMask would in this case have
only a single bit set for "hover". In this way the StyleHelper associated
with the Button would know whether a change to "hover" requires the
button and all children to be update. Other pseudo-class state changes
that are not in this hash set are ignored.
*
Called "triggerStates" since they would trigger a CSS update.
| |
| CssStyleHelper | back to summary |
|---|---|
| private CssStyleHelper() | |
| calculateValue | back to summary |
|---|---|
| private CalculatedValue calculateValue(final CascadingStyle style, final Styleable styleable, final CssMetaData<S extends Styleable, V> cssMetaData, final StyleMap styleMap, final Set<PseudoClass> states, final Styleable originatingStyleable, final CalculatedValue fontFromCacheEntry) | |
| canReuseStyleHelper | back to summary |
|---|---|
| private static boolean canReuseStyleHelper(final Node node, final StyleMap styleMap) | |
| containsProperty | back to summary |
|---|---|
| private boolean containsProperty(Map<String, List<CascadingStyle>> cascadingStyles, CssMetaData<? extends Styleable, ?> propertyMetadata) Returns whether the cascading style map contains the specified property or any of its sub-properties. | |
| createStyleHelper | back to summary |
|---|---|
| pack-priv static CssStyleHelper createStyleHelper(final Node node) Creates a new StyleHelper. | |
| deriveFont | back to summary |
|---|---|
| pack-priv Font deriveFont(Font font, String fontFamily, FontWeight fontWeight, FontPosture fontPosture, double fontSize) | |
| findFirstStyleableAncestor | back to summary |
|---|---|
| private static Node findFirstStyleableAncestor(Styleable st) | |
| formatExceptionMessage | back to summary |
|---|---|
| private String formatExceptionMessage(Styleable styleable, CssMetaData<S extends Styleable, V> cssMetaData, Style style, Exception e) | |
| formatUnresolvedLookupMessage | back to summary |
|---|---|
| private String formatUnresolvedLookupMessage(Styleable styleable, CssMetaData<S extends Styleable, V> cssMetaData, Style style, ParsedValue<V, T> resolved, ClassCastException cce) | |
| getCachedFont | back to summary |
|---|---|
| private CalculatedValue getCachedFont(final Styleable styleable) | |
| getFontFamily | back to summary |
|---|---|
| pack-priv String getFontFamily(Font font) | |
| getFontPosture | back to summary |
|---|---|
| pack-priv FontPosture getFontPosture(Font font) | |
| getFontWeight | back to summary |
|---|---|
| pack-priv FontWeight getFontWeight(Font font) | |
| getInheritedStyle | back to summary |
|---|---|
| private CascadingStyle getInheritedStyle(final Styleable styleable, final String property) Called when we must getInheritedStyle a value from a parent node in the scenegraph. | |
| getMatchingLookupStyles | back to summary |
|---|---|
| private void getMatchingLookupStyles(final Styleable node, final ParsedValue<V, T> parsedValue, final List<CascadingStyle> styleList, boolean matchState) | |
| getMatchingStyles | back to summary |
|---|---|
| pack-priv static List Called from Node NodeHelper.getMatchingStyles | |
| getMatchingStyles | back to summary |
|---|---|
| pack-priv static Map | |
| getMatchingStyles | back to summary |
|---|---|
| private List | |
| getMatchingStyles | back to summary |
|---|---|
| private void getMatchingStyles(final Styleable node, final CssMetaData<S extends Styleable, V> styleableProperty, final List<CascadingStyle> styleList, boolean matchState) | |
| getStyle | back to summary |
|---|---|
| private CascadingStyle getStyle(final Styleable styleable, final String property, final StyleMap styleMap, final Set<PseudoClass> states) Gets the CSS CascadingStyle for the property of this node in these pseudo-class states. A null style may be returned if there is no style information for this combination of input parameters.
| |
| getStyleHelper | back to summary |
|---|---|
| private static CssStyleHelper getStyleHelper(Node n) | |
| getStyleMap | back to summary |
|---|---|
| private StyleMap getStyleMap(Styleable styleable) | |
| getTransitionStates | back to summary |
|---|---|
| private Set Dynamic pseudo-class state of the node and its parents. Only valid during a pulse. The StyleCacheEntry to choose depends on the Node's pseudo-class state and the pseudo-class state of its parents. Without the parent pseudo-class state, the fact that the the node in this pseudo-class state matched foo:blah bar { } is lost. | |
| getUnresolvedLookup | back to summary |
|---|---|
| private String getUnresolvedLookup(final ParsedValue<V, T> resolved) | |
| handleNoStyleFound | back to summary |
|---|---|
| private CalculatedValue handleNoStyleFound(final Styleable styleable, final CssMetaData<S extends Styleable, V> cssMetaData, final StyleMap styleMap, Set<PseudoClass> pseudoClassStates, Styleable originatingStyleable, final CalculatedValue cachedFont) Called when there is no style found. | |
| isTrue | back to summary |
|---|---|
| private static boolean isTrue(WritableValue<Boolean> booleanProperty) | |
| isUserSetFont | back to summary |
|---|---|
| private boolean isUserSetFont(Styleable node) | |
| lookup | back to summary |
|---|---|
| private CalculatedValue lookup(final Styleable styleable, final CssMetaData<S extends Styleable, V> cssMetaData, final StyleMap styleMap, final Set<PseudoClass> states, final Styleable originatingStyleable, final CalculatedValue cachedFont) The main workhorse of this class, the lookup method walks up the CSS style tree looking for the style information for the Node, the property associated with the given styleable, in these states for this font. | |
| lookupFont | back to summary |
|---|---|
| pack-priv CalculatedValue lookupFont(final Styleable styleable, final String property, final StyleMap styleMap, final CalculatedValue cachedFont) Look up a font property. This is handled separately from lookup since font is inherited and has sub-properties. One should expect that the text font for the following would be 16px Arial. The lookup method would give 16px system since it would look only for font-size, font-family, etc only if the lookup on font failed.
Text text = new Text("Hello World");
text.setStyle("-fx-font-size: 16px;");
Group group = new Group();
group.setStyle("-fx-font: 12px Arial;");
group.getChildren().add(text);
| |
| lookupInheritedFontProperty | back to summary |
|---|---|
| private CascadingStyle lookupInheritedFontProperty(final Styleable styleable, final String property, final StyleMap styleMap, final int distance, CascadingStyle fontShorthand) | |
| pseudoClassStateChanged | back to summary |
|---|---|
| pack-priv boolean pseudoClassStateChanged(PseudoClass pseudoClass) | |
| recalculateRelativeSizeProperties | back to summary |
|---|---|
| pack-priv void recalculateRelativeSizeProperties(final Node node, Font fontForRelativeSizes) | |
| resetToInitialValue | back to summary |
|---|---|
| private void resetToInitialValue(Styleable styleable, CssMetaData<S extends Styleable, V> metadata, CalculatedValue initialValue) Resets the property to its initial value, but only if the property value is currently set by CSS;
that is, its style origin is either | |
| resetToInitialValues | back to summary |
|---|---|
| private Map Resets any properties on the given
| |
| resolveLookups | back to summary |
|---|---|
| private ParsedValue | |
| resolveRef | back to summary |
|---|---|
| private CascadingStyle resolveRef(final Styleable styleable, final String property, final StyleMap styleMap, final Set<PseudoClass> states) Find the property among the styles that pertain to the Node | |
| setTrue | back to summary |
|---|---|
| private static void setTrue(WritableValue<Boolean> booleanProperty) | |
| transitionToState | back to summary |
|---|---|
| pack-priv void transitionToState(final Node node) Called by the Node whenever it has transitioned from one set of
pseudo-class states to another. This function will then lookup the
new values for each of the styleable variables on the Node, and
then set the new value via | |
| updateParentTriggerStates | back to summary |
|---|---|
| private static void updateParentTriggerStates(Styleable styleable, int depth, PseudoClassState[] triggerStates) | |
| Modifier and Type | Field and Description |
|---|---|
| private final Map | |
| private final CssMetaData | |
| private final Map | |
| private boolean | |
| private final int | |
| private final StyleCache. |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| private StyleMap |
| cssSetProperties | back to summary |
|---|---|
| private final Map<CssMetaData<S extends Styleable, V>, CalculatedValue> cssSetProperties | |
| fontProp | back to summary |
|---|---|
| private final CssMetaData<Styleable, Font> fontProp | |
| fontSizeCache | back to summary |
|---|---|
| private final Map<StyleCacheEntry. | |
| forceSlowpath | back to summary |
|---|---|
| private boolean forceSlowpath | |
| smapId | back to summary |
|---|---|
| private final int smapId | |
| styleCacheKey | back to summary |
|---|---|
| private final StyleCache. | |
| CacheContainer | back to summary |
|---|---|
| private CacheContainer(Node node, final StyleMap styleMap, int depth) | |
| getStyleMap | back to summary |
|---|---|
| private StyleMap getStyleMap(Styleable styleable) | |