Package javafx.css

Interface Styleable

All Known Implementing Classes:
AnchorPane, Arc, BorderPane, Button, ButtonBar, ButtonBase, Canvas, Cell, CheckBox, ChoiceBox, Circle, ComboBoxBase, ContextMenu, ContextMenuContent, ContextMenuContent.MenuItemContainer, Control, CustomMenuItem, DatePicker, DialogPane, FlowPane, GridPane, Group, HBox, Hyperlink, ImageView, Label, Labeled, LabeledText, Line, MediaView, Menu, MenuItem, Node, Pane, Parent, PasswordField, Path, PopupControl, PopupControl.CSSBridge, ProgressBar, ProgressIndicator, RadioButton, Rectangle, Region, ScrollPane, Separator, SeparatorMenuItem, Shape, Slider, SplitPane, StackPane, SVGPath, Tab, TabPane, Text, TextArea, TextField, TextFlow, TextInputControl, TitledPane, ToggleButton, ToolkitTextBox, VBox, WebView

public interface Styleable
Styleable comprises the minimal interface required for an object to be styled by CSS.
Since:
JavaFX 8.0
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    The id of this Styleable.
    A string representation of the CSS style associated with this specific Node.
    A list of String identifiers which can be used to logically group Nodes, specifically for an external style engine.
  • Method Details

    • 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");.

    • 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.
      See Also:
    • 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.