Interface Styleable
All Known Implementing Classes:
Accordion, AmbientLight, AnchorPane, Arc, AreaChart, Axis, BarChart, BorderPane, Box, BubbleChart, Button, ButtonBar, ButtonBase, Camera, Canvas, CategoryAxis, Cell, Chart, CheckBox, CheckBoxListCell, CheckBoxTableCell, CheckBoxTreeCell, CheckBoxTreeTableCell, CheckMenuItem, ChoiceBox, ChoiceBoxListCell, ChoiceBoxTableCell, ChoiceBoxTreeCell, ChoiceBoxTreeTableCell, Circle, ColorPicker, ComboBox, ComboBoxBase, ComboBoxListCell, ComboBoxTableCell, ComboBoxTreeCell, ComboBoxTreeTableCell, ContextMenu, Control, CubicCurve, CustomMenuItem, Cylinder, DateCell, DatePicker, DialogPane, Ellipse, FlowPane, GridPane, Group, HBox, HTMLEditor, Hyperlink, ImageView, IndexedCell, Label, Labeled, LightBase, Line, LineChart, ListCell, ListView, MediaView, Menu, MenuBar, MenuButton, MenuItem, MeshView, Node, NumberAxis, Pagination, Pane, ParallelCamera, Parent, PasswordField, Path, PerspectiveCamera, PieChart, PointLight, Polygon, Polyline, PopupControl, PopupControl.CSSBridge, ProgressBar, ProgressBarTableCell, ProgressBarTreeTableCell, ProgressIndicator, QuadCurve, RadioButton, RadioMenuItem, Rectangle, Region, ScatterChart, ScrollBar, ScrollPane, Separator, SeparatorMenuItem, Shape, Shape3D, Slider, Sphere, Spinner, SplitMenuButton, SplitPane, StackedAreaChart, StackedBarChart, StackPane, SubScene, SVGPath, SwingNode, Tab, TableCell, TableColumn, TableColumnBase, TableRow, TableView, TabPane, Text, TextArea, TextField, TextFieldListCell, TextFieldTableCell, TextFieldTreeCell, TextFieldTreeTableCell, TextFlow, TextInputControl, TilePane, TitledPane, ToggleButton, ToolBar, Tooltip, TreeCell, TreeTableCell, TreeTableColumn, TreeTableRow, TreeTableView, TreeView, ValueAxis, VBox, WebView, XYChart
public interface Styleable
Since:
JavaFX 8.0
See Also:
-
Method Summary
All MethodsInstance MethodsAbstract Methods Modifier and Type Method and Description List<CssMetaData<? extends Styleable,?>>getCssMetaData()The CssMetaData of this Styleable.StringgetId()The id of thisStyleable.ObservableSet<PseudoClass>getPseudoClassStates()Return the pseudo-class state of this Styleable.StringgetStyle()A string representation of the CSS style associated with this specificNode.StyleablegetStyleableParent()Return the parent of this Styleable, or null if there is no parent.ObservableList<String>getStyleClass()A list of String identifiers which can be used to logically group Nodes, specifically for an external style engine.StringgetTypeSelector()The type of thisStyleablethat is to be used in selector matching.
-
Method Detail
-
getTypeSelector
String getTypeSelector()
The type of thisStyleablethat is to be used in selector matching. This is analogous to an "element" in HTML. (CSS Type Selector).
-
getId
String getId()
The id of thisStyleable. 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 specificNode. 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.
-
getCssMetaData
List<CssMetaData<? extends Styleable,?>> getCssMetaData()
The CssMetaData of this Styleable. This may be returned as an unmodifiable list.
-
getStyleableParent
Styleable getStyleableParent()
Return 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.
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.