Class Selector
java.lang.Object
javafx.css.Selector
Used by 
CSSRule to determine whether or not the Selector applies to a
 given object.- Since:
- 9
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract booleanGets whether thisSelectorapplies to the givenStyleable.abstract booleanapplies(Styleable styleable, Set<PseudoClass>[] triggerStates, int depth) Gets whether thisSelectorapplies to the givenStyleable.final MatchCreates aMatch.static SelectorcreateSelector(String cssSelector) Creates aSelectorobject.intGets the ordinal of this Selector.getRule()Gets theRuleof this Selector.Gets the immutable set of style class names of this Selector.voidsetOrdinal(int ordinal) Sets the ordinal of this Selector.abstract booleanstateMatches(Styleable styleable, Set<PseudoClass> state) Determines whether the current state of theNodeand its parents matches the pseudo-classes defined (if any) for this selector.
- 
Constructor Details- 
Selectorprotected Selector()Constructor for subclasses to call.- Since:
- 24
 
 
- 
- 
Method Details- 
getRule
- 
setOrdinalpublic void setOrdinal(int ordinal) Sets the ordinal of this Selector.- Parameters:
- ordinal- the ordinal of this Selector
 
- 
getOrdinalpublic int getOrdinal()Gets the ordinal of this Selector.- Returns:
- the ordinal of this Selector
 
- 
getStyleClassNames
- 
createMatch
- 
appliesGets whether thisSelectorapplies to the givenStyleable.- Parameters:
- styleable- the- Styleableto match
- Returns:
- trueif this- Selectorapplies to the given- Styleable
 
- 
appliesGets whether thisSelectorapplies to the givenStyleable. It is the same as theapplies(javafx.css.Styleable)method except it also returnsPseudoClassstate that it finds along the way.- Parameters:
- styleable- the- Styleableto match
- triggerStates- a set of- PseudoClassstates
- depth- depth of the- Nodeheirarchy to look for
- Returns:
- trueif this- Selectorand a set of- PseudoClassapplies to the given- Styleable
 
- 
stateMatchesDetermines whether the current state of theNodeand its parents matches the pseudo-classes defined (if any) for this selector.- Parameters:
- styleable- the styleable
- state- the state
- Returns:
- trueif the current state of the node and its parents matches the pseudo-classes defined (if any) for this selector
 
- 
createSelector
 
-