Package javafx.css

Class 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 Detail

      • Selector

        public Selector()
    • 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)
      • 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 styleable
        state - the state
        Returns:
        true if the current state of the node and its parents matches the pseudo-classes defined (if any) for this selector
      • createSelector

        public static Selector createSelector​(String cssSelector)