# Class Style

java.lang.Object
javafx.css.Style

public final class Style extends Object
A Style is just the selector and declaration from a Rule.

Since:
  9

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Style(Selector selector, Declaration declaration)`
  Constructs a `Style` object.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Declaration`
  `getDeclaration()`
  The Declaration that is the source of the style that is about to be applied or has just been applied.
  `Selector`
  `getSelector()`
  A selector might have more than one selector.

  ### Methods declared in class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Style

    public Style(Selector selector, Declaration declaration)
    Constructs a `Style` object.
    Parameters:
      `selector` - selector for this `Style`
      `declaration` - declaration for this `Style`

- ## Method Details

  - ### getSelector

    public Selector getSelector()
    A selector might have more than one selector. This is the one that was matched.
    Returns:
      the matched selector

  - ### getDeclaration

    public Declaration getDeclaration()
    The Declaration that is the source of the style that is about to be applied or has just been applied. May be null if the value comes from the CSSProperty's initial (default) value.
    Returns:
      the declaration