Top Description Fields Constructors Methods
com.sun.javafx.css

public Class CascadingStyle

extends Object
implements Comparable<CascadingStyle>
Class Inheritance
All Implemented Interfaces
java.lang.Comparable
Imports
javafx.css.Declaration, .Match, .ParsedValue, .PseudoClass, .Rule, .Selector, .Style, .StyleOrigin, java.util.Set

A marriage of pseudo-classes (potentially empty) to property and value
Since
9

Field Summary

Modifier and TypeField and Description
private final int
private final Set<PseudoClass>
pseudoClasses

State variables, like "hover" or "pressed"

private final boolean
private final int
private final Style

Constructor Summary

AccessConstructor and Description
public
CascadingStyle(final Style style, Set<PseudoClass> pseudoClasses, final int specificity, final int ordinal)

public
CascadingStyle(final Declaration decl, final Match match, final int ordinal)

Method Summary

Modifier and TypeMethod and Description
public int
compareTo(CascadingStyle
the object to be compared.
other
)

Implements java.lang.Comparable.compareTo.

Implementation of Comparable such that more specific styles get sorted before less specific ones.

public boolean
equals(Object
the reference object with which to compare.
obj
)

Overrides java.lang.Object.equals.

When testing equality against another Style, we only care about the property and pseudo-classes.

public StyleOrigin
public ParsedValue<V, T>
public String
public Rule
public Selector
public Style
public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAllwaitwaitwait

Field Detail

ordinalback to summary
private final int ordinal
pseudoClassesback to summary
private final Set<PseudoClass> pseudoClasses

State variables, like "hover" or "pressed"

skinPropback to summary
private final boolean skinProp
specificityback to summary
private final int specificity
styleback to summary
private final Style style

Constructor Detail

CascadingStyleback to summary
public CascadingStyle(final Style style, Set<PseudoClass> pseudoClasses, final int specificity, final int ordinal)
CascadingStyleback to summary
public CascadingStyle(final Declaration decl, final Match match, final int ordinal)

Method Detail

compareToback to summary
public int compareTo(CascadingStyle other)

Implements java.lang.Comparable.compareTo.

Implementation of Comparable such that more specific styles get sorted before less specific ones.

Parameters
other:CascadingStyle

Doc from java.lang.Comparable.compareTo.

the object to be compared.

Returns:int

Doc from java.lang.Comparable.compareTo.

a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

Annotations
@Override
equalsback to summary
public boolean equals(Object obj)

Overrides java.lang.Object.equals.

When testing equality against another Style, we only care about the property and pseudo-classes. In other words, we only care about where the style is applied, not what is applied.

Parameters
obj:Object

Doc from java.lang.Object.equals.

the reference object with which to compare.

Returns:boolean

Doc from java.lang.Object.equals.

true if this object is the same as the obj argument; false otherwise.

Annotations
@Override
getOriginback to summary
public StyleOrigin getOrigin()
getParsedValueback to summary
public ParsedValue<V, T> getParsedValue()
getPropertyback to summary
public String getProperty()
getRuleback to summary
public Rule getRule()
getSelectorback to summary
public Selector getSelector()
getStyleback to summary
public Style getStyle()
hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.
Returns:int

a hash code value for this object

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Returns:String

a string representation of the object

Annotations
@Override