Basics
Guides
API Reference
Basics
Guides
API Reference
[18:7] extends: FxObj
The Tab class wraps the JavaFX Tab, which represents a single selectable tab within a TabPane. Each Tab holds a label, an optional graphic icon, and a content node that is displayed in the TabPane body when that tab is selected. Tabs can be individually disabled or made non-closable regardless of the TabPane closing policy. Note that Tab does not extend Node or Region in JavaFX -- it is not part of the scene graph on its own. Its visual appearance is controlled entirely through the skin of the owning TabPane and the CSS sub-structure of that skin. Because of this, the standard Node/Region/Control CSS property hierarchy does not apply directly to Tab.
Tab (string Text = "")
Creates a new Tab with the specified label text.
Text is a string with the tab label.setText (string Text)
Sets the tab label text.
Text is a string with the label.this object for chaininggetText ()
Gets the tab label text.
A string with the label.setContent (object ContentObj)
Sets the content node displayed when this tab is selected.
ContentObj is a Node object to display.this object for chainingsetClosable (bool Closable)
Sets whether the tab can be closed by the user.
Closable is a bool with true to allow closing.this object for chainingsetGraphic (object Graphic)
Sets a graphic (icon) for the tab.
Graphic is a Node object to use as the graphic.this object for chainingsetDisable (bool Disable)
Sets whether the tab is disabled.
Disable is a bool with true to disable.this object for chaininggetContent ()
Returns the content node displayed when this tab is selected.
A Node with the current content, or null if none is set.isClosable ()
Returns whether the tab can be closed by the user.
A bool with true if the tab is closable.setId (string Id)
Sets the CSS id of this tab.
Id is a string with the CSS id.this object for chainingsetStyle (string Style)
Sets the inline CSS style string for this tab.
Style is a string with the CSS style rules.this object for chainingonClosed (callback OnClosed)
Sets a callback for when the tab is closed.
OnClosed is a callback to call on close.this object for chainingsetOnSelectionChanged (callback OnChanged)
Sets a callback that fires when this tab's selected state changes.
OnChanged is a callback to call on selection change.this object for chaininggetId ()
Returns the CSS id of this tab.
A string with the id.idProperty ()
Returns the id StringProperty for binding.
An AJO around the StringProperty.getStyle ()
Returns the inline CSS style string.
A string with the style.styleProperty ()
Returns the style StringProperty for binding.
An AJO around the StringProperty.isSelected ()
Returns whether this tab is the currently selected tab in its owning TabPane.
A bool with true if selected.selectedProperty ()
Returns the selected ReadOnlyBooleanProperty for binding.
An AJO around the ReadOnlyBooleanProperty.getTabPane ()
Returns the owning TabPane, or null if this tab is not in a pane.
An AJO around the TabPane, or null.tabPaneProperty ()
Returns the tabPane ReadOnlyObjectProperty for binding.
An AJO around the ReadOnlyObjectPropertytextProperty ()
Returns the text StringProperty for binding.
An AJO around the StringProperty.getGraphic ()
Returns the graphic node displayed in the tab header.
An AJO around the Node, or null.graphicProperty ()
Returns the graphic ObjectProperty for binding.
An AJO around the ObjectPropertycontentProperty ()
Returns the content ObjectProperty for binding.
An AJO around the ObjectPropertysetContextMenu (object Menu)
Sets the context menu shown when the user right-clicks this tab.
Menu is a ContextMenu wrapper object.this object for chaininggetContextMenu ()
Returns the context menu for this tab.
An AJO around the ContextMenu, or null.contextMenuProperty ()
Returns the contextMenu ObjectProperty for binding.
An AJO around the ObjectPropertyclosableProperty ()
Returns the closable BooleanProperty for binding.
An AJO around the BooleanProperty.getOnSelectionChanged ()
Returns the current selection-changed event handler.
An AJO around the EventHandler, or null.onSelectionChangedProperty ()
Returns the onSelectionChanged ObjectProperty for binding.
An AJO around the ObjectPropertysetOnClosed (callback Cb)
Sets a callback that fires after the tab has been closed.
Cb is a callback receiving an Event.this object for chaininggetOnClosed ()
Returns the current on-closed event handler.
An AJO around the EventHandler, or null.onClosedProperty ()
Returns the onClosed ObjectProperty for binding.
An AJO around the ObjectPropertysetTooltip (object Tip)
Sets the tooltip shown when the user hovers over this tab.
Tip is a Tooltip wrapper object.this object for chaininggetTooltip ()
Returns the tooltip for this tab.
An AJO around the Tooltip, or null.tooltipProperty ()
Returns the tooltip ObjectProperty for binding.
An AJO around the ObjectPropertyisDisable ()
Returns whether this tab has been explicitly disabled.
A bool with true if disabled.disableProperty ()
Returns the disable BooleanProperty for binding.
An AJO around the BooleanProperty.isDisabled ()
Returns whether this tab is in the disabled state (computed from the disable property and the tab's ancestors).
A bool with true if disabled.disabledProperty ()
Returns the disabled ReadOnlyBooleanProperty for binding.
An AJO around the ReadOnlyBooleanProperty.onCloseRequestProperty ()
Returns the onCloseRequest ObjectProperty for binding.
An AJO around the ObjectPropertygetOnCloseRequest ()
Returns the current on-close-request event handler.
An AJO around the EventHandler, or null.setOnCloseRequest (callback Cb)
Sets a callback that fires before this tab is closed, allowing the close to be vetoed by consuming the event.
Cb is a callback receiving an Event.this object for chaininggetProperties ()
Returns the general-purpose ObservableMap of properties on this tab.
An AJO around the ObservableMap<Object,Object>.hasProperties ()
Returns whether this tab has any entries in its properties map.
A bool with true if properties exist.setUserData (Value)
Sets the user-data slot on this tab.
Value is any value to store on the tab.this object for chaininggetUserData ()
Returns the user-data slot value stored on this tab.
An AJO around the stored value, or null.getStyleClass ()
Returns the CSS style-class ObservableList for this tab.
An AJO around the ObservableListbuildEventDispatchChain (object Tail)
Builds the event dispatch chain for this tab from the supplied tail.
Tail is an AJO around a javafx.event.EventDispatchChain.An AJO around the resulting EventDispatchChain.getTypeSelector ()
Returns the CSS type selector for this Styleable.
A string with the type selector.getStyleableParent ()
Returns the styleable parent of this tab.
An AJO around the parent Styleable, or null.getPseudoClassStates ()
Returns the set of CSS pseudo-class states currently active.
An AJO around the ObservableSetgetCssMetaData ()
Returns the CSS metadata for this tab's styleable properties.
A list of CssMetaData entries.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.