java.lang.Object
javafx.css.Selector
javafx.css.CompoundSelector
public final class CompoundSelector extends Selector
A compound selector which behaves according to the CSS standard. The selector is
composed of one or more
Selectors
, along with an array of
CompoundSelectorRelationships
indicating the required relationship at each
stage. There must be exactly one less Combinator
than
there are selectors.
For example, the parameters [selector1, selector2, selector3]
and [Combinator.CHILD, Combinator.DESCENDANT]
will match
a component when all of the following conditions hold:
- The component itself is matched by selector3
- The component has an ancestor which is matched by selector2
- The ancestor matched in step 2 is a direct CHILD of a component matched by selector1
selector1 > selector2 selector3
. The greater-than (>)
between selector1 and selector2 specifies a direct CHILD, whereas the
whitespace between selector2 and selector3 corresponds to
Combinator.DESCENDANT
.- Since:
- 9
-
Method Summary
Modifier and Type Method Description List<SimpleSelector>
getSelectors()
The selectors that make up this compound selectorMethods declared in class javafx.css.Selector
applies, applies, createMatch, createSelector, getOrdinal, getRule, setOrdinal, stateMatches, writeBinary
-
Method Details
-
getSelectors
The selectors that make up this compound selector- Returns:
- Immutable List<SimpleSelector>
-