- java.lang.Object
-
- javafx.css.Selector
-
- javafx.css.SimpleSelector
-
public final class SimpleSelector extends Selector
A simple selector which behaves according to the CSS standard.- Since:
- 9
-
Method Summary
All MethodsInstance MethodsConcrete Methods Modifier and Type Method Description booleanapplies(Styleable styleable)booleanapplies(Styleable styleable, Set<PseudoClass>[] pseudoClasses, int depth)MatchcreateMatch()booleanequals(Object obj)StringgetId()StringgetName()NodeOrientationgetNodeOrientation()List<String>getStyleClasses()Set<StyleClass>getStyleClassSet()inthashCode()booleanstateMatches(Styleable styleable, Set<PseudoClass> states)Determines whether the current state of the node and its parents matches the pseudo-classes defined (if any) for this selector.StringtoString()Converts this object to a string.protected voidwriteBinary(DataOutputStream os, StyleConverter.StringStore stringStore)-
Methods inherited from class javafx.css.Selector
createSelector, getOrdinal, getRule, setOrdinal
-
-
Method Detail
-
getName
public String getName()
- Returns:
- The name of the java class to which this selector is applied, or *.
-
getStyleClasses
public List<String> getStyleClasses()
- Returns:
- Immutable List<String> of style-classes of the selector
-
getStyleClassSet
public Set<StyleClass> getStyleClassSet()
-
getId
public String getId()
-
getNodeOrientation
public NodeOrientation getNodeOrientation()
-
createMatch
public Match createMatch()
- Specified by:
-
createMatchin classSelector
-
applies
public boolean applies(Styleable styleable, Set<PseudoClass>[] pseudoClasses, int depth)
-
stateMatches
public boolean stateMatches(Styleable styleable, Set<PseudoClass> states)
Description copied from class:SelectorDetermines whether the current state of the node and its parents matches the pseudo-classes defined (if any) for this selector.- Specified by:
-
stateMatchesin classSelector - Parameters:
-
styleable- the styleable -
states- the state - Returns:
-
trueif the current state of the node and its parents matches the pseudo-classes defined (if any) for this selector
-
toString
public String toString()
Converts this object to a string.
-
writeBinary
protected final void writeBinary(DataOutputStream os, StyleConverter.StringStore stringStore) throws IOException
- Overrides:
-
writeBinaryin classSelector - Throws:
IOException
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.