java.lang.Object
javafx.css.Rule
public final class Rule extends Object
A Rule is a collection of CSS
Selector
s and Declaration
s.- Since:
- 9
-
Method Summary
Modifier and Type Method Description ObservableList<Declaration>
getDeclarations()
This method is to support tooling that may want to add declarations to or remove declarations from a Rule.StyleOrigin
getOrigin()
Get theStyleOrigin
of thisStylesheet
.ObservableList<Selector>
getSelectors()
This method is to support tooling that may want to add selectors to or remove selectors from a Rule.Stylesheet
getStylesheet()
Gets theStylesheet
thisRule
belongs to.String
toString()
Converts this object to aString
.
-
Method Details
-
getDeclarations
This method is to support tooling that may want to add declarations to or remove declarations from a Rule. Changes to the list are tracked so that added declarations are tagged as belonging to this rule, and the rule for removed declarations is nulled out.- Returns:
- a observable list of declarations
-
getSelectors
This method is to support tooling that may want to add selectors to or remove selectors from a Rule. Changes to the list are tracked so that added selectors are tagged as belonging to this rule, and the rule for removed selectors is nulled out.- Returns:
- an observable list of selectors
-
getStylesheet
Gets theStylesheet
thisRule
belongs to.- Returns:
- the stylesheet
-
getOrigin
Get theStyleOrigin
of thisStylesheet
.- Returns:
- the origin of the stylesheet
-
toString
Converts this object to aString
.
-