Package javafx.css

Interface Styleable

    • Method Detail

      • getTypeSelector

        String getTypeSelector()
        The type of this Styleable that is to be used in selector matching. This is analogous to an "element" in HTML. (CSS Type Selector).
        Returns:
        the type of this Styleable
      • getId

        String getId()
        The id of this Styleable. This simple string identifier is useful for finding a specific Node within the scene graph. While the id of a Node should be unique within the scene graph, this uniqueness is not enforced. This is analogous to the "id" attribute on an HTML element (CSS ID Specification).

        For example, if a Node is given the id of "myId", then the lookup method can be used to find this node as follows: scene.lookup("#myId");.

        Returns:
        the id of this Styleable
      • getStyleClass

        ObservableList<String> getStyleClass()
        A list of String identifiers which can be used to logically group Nodes, specifically for an external style engine. This variable is analogous to the "class" attribute on an HTML element and, as such, each element of the list is a style class to which this Node belongs.
        Returns:
        a list of String identifiers which can be used to logically group Nodes, specifically for an external style engine
        See Also:
        CSS3 class selectors
      • getStyle

        String getStyle()
        A string representation of the CSS style associated with this specific Node. This is analogous to the "style" attribute of an HTML element. Note that, like the HTML style attribute, this variable contains style properties and values and not the selector portion of a style rule.
        Returns:
        a string representation of the CSS style associated with this specific Node
      • getCssMetaData

        List<CssMetaData<? extends Styleable,​?>> getCssMetaData()
        The CssMetaData of this Styleable. This may be returned as an unmodifiable list.
        Returns:
        the CssMetaData
      • getStyleableParent

        Styleable getStyleableParent()
        Return the parent of this Styleable, or null if there is no parent.
        Returns:
        the parent of this Styleable, or null if there is no parent
      • getPseudoClassStates

        ObservableSet<PseudoClass> getPseudoClassStates()
        Return the pseudo-class state of this Styleable. CSS assumes this set is read-only.
        Returns:
        the pseudo-class state
      • getStyleableNode

        default Node getStyleableNode()
        Returns the Node that represents this Styleable object. This method should be overridden in cases where the Styleable is not itself a Node, so that it may optionally return the relevant root node representation of itself. By default this method returns null, which can mean that either the Styleable itself is a Node, or if that is not the case, that the Styleable does not have a node representation available at the time of request.
        Returns:
        the Node that represents this Styleable object
        Since:
        9