- java.lang.Object
-
- javafx.css.Selector
-
- Direct Known Subclasses:
CompoundSelector,SimpleSelector
public abstract class Selector extends Object
Used by CSSRule to determine whether or not the selector applies to a given object.- Since:
- 9
-
-
Constructor Summary
Constructors Constructor Description Selector()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanapplies(Styleable styleable)abstract booleanapplies(Styleable styleable, Set<PseudoClass>[] triggerStates, int bit)abstract MatchcreateMatch()static SelectorcreateSelector(String cssSelector)intgetOrdinal()RulegetRule()voidsetOrdinal(int ordinal)abstract booleanstateMatches(Styleable styleable, Set<PseudoClass> state)Determines whether the current state of the node and its parents matches the pseudo-classes defined (if any) for this selector.protected voidwriteBinary(DataOutputStream os, StyleConverter.StringStore stringStore)
-
-
-
Method Detail
-
getRule
public Rule getRule()
-
setOrdinal
public void setOrdinal(int ordinal)
-
getOrdinal
public int getOrdinal()
-
createMatch
public abstract Match createMatch()
-
applies
public abstract boolean applies(Styleable styleable)
-
applies
public abstract boolean applies(Styleable styleable, Set<PseudoClass>[] triggerStates, int bit)
-
stateMatches
public abstract boolean stateMatches(Styleable styleable, Set<PseudoClass> state)
Determines whether the current state of the node and its parents matches the pseudo-classes defined (if any) for this selector.- Parameters:
styleable- the styleablestate- the state- Returns:
trueif the current state of the node and its parents matches the pseudo-classes defined (if any) for this selector
-
writeBinary
protected void writeBinary(DataOutputStream os, StyleConverter.StringStore stringStore) throws IOException
- Throws:
IOException
-
-