APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javafx.css

public final Class Rule

extends Object
Class Inheritance
Imports
javafx.collections.ListChangeListener.Change, .ObservableList, javafx.scene.Node, com.sun.javafx.collections.TrackableObservableList, com.sun.javafx.css.BinarySerializer, .RuleHelper, com.sun.javafx.css.media.MediaRule, java.io.ByteArrayInputStream, .ByteArrayOutputStream, .DataInputStream, .DataOutputStream, .IOException, java.util.ArrayList, .List, .Set

A Rule is a collection of CSS Selectors and Declarations.
Since
9

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final int
private List<Declaration>
private final MediaRule
private Rule.Observables
private List<Selector>
private byte[]
private Stylesheet

Constructor Summary

AccessConstructor and Description
pack-priv
Rule(MediaRule mediaRule, List<Selector> selectors, List<Declaration> declarations)

private
Rule(MediaRule mediaRule, List<Selector> selectors, byte[] buf, int bssVersion)

Method Summary

Modifier and TypeMethod and Description
pack-priv long
applies(Node node, Set<PseudoClass>[] triggerStates)

public final ObservableList<Declaration>

Returns:

a observable list of declarations
getDeclarations
()

This method is to support tooling that may want to add declarations to or remove declarations from a Rule.

public StyleOrigin

Returns:

the origin of the stylesheet
getOrigin
()

Get the StyleOrigin of this Stylesheet.

public final ObservableList<Selector>

Returns:

an observable list of selectors
getSelectors
()

This method is to support tooling that may want to add selectors to or remove selectors from a Rule.

public Stylesheet

Returns:

the stylesheet
getStylesheet
()

Gets the Stylesheet this Rule belongs to.

pack-priv List<Declaration>
getUnobservedDeclarationList()

The list returned from this method should be treated as unmodifiable.

pack-priv List<Selector>
getUnobservedSelectorList()

The list returned from this method should be treated as unmodifiable.

pack-priv static Rule
readBinary(int bssVersion, DataInputStream is, String[] strings)

pack-priv void
public String

Returns:

the converted String
toString
()

Overrides java.lang.Object.toString.

Converts this object to a String.

pack-priv final void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

bssVersionback to summary
private final int bssVersion
declarationsback to summary
private List<Declaration> declarations
mediaRuleback to summary
private final MediaRule mediaRule
observablesback to summary
private Rule.Observables observables
selectorsback to summary
private List<Selector> selectors
serializedDeclsback to summary
private byte[] serializedDecls
stylesheetback to summary
private Stylesheet stylesheet

Constructor Detail

Ruleback to summary
pack-priv Rule(MediaRule mediaRule, List<Selector> selectors, List<Declaration> declarations)
Ruleback to summary
private Rule(MediaRule mediaRule, List<Selector> selectors, byte[] buf, int bssVersion)

Method Detail

appliesback to summary
pack-priv long applies(Node node, Set<PseudoClass>[] triggerStates)
getDeclarationsback to summary
public final ObservableList<Declaration> 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:ObservableList<Declaration>

a observable list of declarations

getOriginback to summary
public StyleOrigin getOrigin()

Get the StyleOrigin of this Stylesheet.

Returns:StyleOrigin

the origin of the stylesheet

getSelectorsback to summary
public final ObservableList<Selector> 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:ObservableList<Selector>

an observable list of selectors

getStylesheetback to summary
public Stylesheet getStylesheet()

Gets the Stylesheet this Rule belongs to.

Returns:Stylesheet

the stylesheet

getUnobservedDeclarationListback to summary
pack-priv List<Declaration> getUnobservedDeclarationList()

The list returned from this method should be treated as unmodifiable. Tools should use getDeclarations() which tracks adds and removes.

getUnobservedSelectorListback to summary
pack-priv List<Selector> getUnobservedSelectorList()

The list returned from this method should be treated as unmodifiable. Tools should use getSelectors() which tracks adds and removes.

readBinaryback to summary
pack-priv static Rule readBinary(int bssVersion, DataInputStream is, String[] strings) throws IOException
setStylesheetback to summary
pack-priv void setStylesheet(Stylesheet stylesheet)
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Converts this object to a String.

Returns:String

the converted String

Annotations
@Override
writeBinaryback to summary
pack-priv final void writeBinary(DataOutputStream os, StyleConverter.StringStore stringStore) throws IOException
javafx.css back to summary

private final Class Rule.Observables

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final ObservableList<Declaration>
private final Rule
private final ObservableList<Selector>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private ObservableList<Declaration>
private ObservableList<Selector>
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

declarationObservableListback to summary
private final ObservableList<Declaration> declarationObservableList
ruleback to summary
private final Rule rule
selectorObservableListback to summary
private final ObservableList<Selector> selectorObservableList

Constructor Detail

Observablesback to summary
private Observables(Rule rule)

Method Detail

getDeclarationsback to summary
private ObservableList<Declaration> getDeclarations()
getSelectorsback to summary
private ObservableList<Selector> getSelectors()