Tabs are placed within a TabPane, where each tab represents a single
'page'.
Tabs can contain any Node such as UI controls or groups
of nodes added to a layout container.
When the user clicks on a Tab in the TabPane the Tab content becomes visible to the user.
| Modifier and Type | Field and Description |
|---|---|
| private BooleanProperty | |
| public static final EventType | CLOSED_EVENT
Called when a user closes this tab. |
| private ObjectProperty | |
| private ObjectProperty | |
| private static final String | |
| private BooleanProperty | |
| private ReadOnlyBooleanWrapper | |
| private final EventHandlerManager | |
| private ObjectProperty | |
| private StringProperty | |
| private ObjectProperty | |
| private ObjectProperty | onCloseRequest
Called when there is an external request to close this |
| private ObjectProperty | |
| private final InvalidationListener | |
| private ObservableMap | |
| private ReadOnlyBooleanWrapper | |
| public static final EventType | SELECTION_CHANGED_EVENT
Called when the tab becomes selected or unselected. |
| private StringProperty | |
| private final ObservableList | |
| public static final EventType | TAB_CLOSE_REQUEST_EVENT
Called when there is an external request to close this |
| private ReadOnlyObjectWrapper | |
| private StringProperty | |
| private ObjectProperty | |
| private static final Object |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final <E extends Event> void | addEventFilter(EventType<E>
the type of the events received by the filter eventType, EventHandler<? super E> the event filter eventFilter)Overrides default javafx. Registers an event filter for this target. |
| public final <E extends Event> void | addEventHandler(EventType<E>
the type of the events received by the handler eventType, EventHandler<? super E> the event handler eventHandler)Overrides default javafx. Registers an event handler for this target. |
| public EventDispatchChain | buildEventDispatchChain(EventDispatchChain
the initial chain to build from tail)Implements javafx. Construct an event dispatch chain for this target. |
| public final BooleanProperty | |
| public final ObjectProperty | |
| public final ObjectProperty | |
| public final ReadOnlyBooleanProperty | |
| private ReadOnlyBooleanWrapper | |
| public final BooleanProperty | |
| public static List | Returns: theCssMetaDataGets the |
| public final Node | |
| public final ContextMenu | Returns: The context menu associated with the tab.The context menu associated with the tab. |
| public List | |
| public final Node | |
| public final String | |
| public final EventHandler | Returns: The event handler that is associated with the tab when the tab is closed.The event handler that is associated with the tab when the tab is closed. |
| public EventHandler | |
| public final EventHandler | Returns: The event handler that is associated with a tab selection.The event handler that is associated with a selection on the tab. |
| public final ObservableMap | Returns: an observable map of properties on this Tab for use primarily by application developersReturns an observable map of properties on this Tab for use primarily by application developers. |
| public final ObservableSet | getPseudoClassStates()
Implements javafx. Return the pseudo-class state of this Styleable. |
| public final String | Returns: The CSS style string associated to this tab.Implements javafx. The CSS style string associated to this tab. |
| public Styleable | Returns: getTabPane()Implements javafx. Return the parent of this Styleable, or null if there is no parent. |
| public ObservableList | getStyleClass()
Implements javafx. A list of String identifiers which can be used to logically group Nodes, specifically for an external style engine. |
| public final TabPane | |
| public final String | |
| public final Tooltip | |
| public String | Returns: "Tab"Implements javafx. The type of this |
| public Object | Returns: The Object that was previously set, or null if no property has been set or if null was set.Returns a previously set Object property, or null if no such property
has been set using the |
| public final ObjectProperty | |
| public boolean | |
| public final StringProperty | |
| public final boolean | |
| public final boolean | |
| public final boolean | Returns: true if the TabPane is disabledReturns true when the |
| public final boolean | Returns: true if selectedRepresents whether this tab is the currently selected tab,
To change the selected Tab use |
| pack-priv Node | |
| pack-priv List | |
| public final ObjectProperty | Returns: the on closed event handler propertyThe event handler that is associated with the tab when the tab is closed. |
| public final ObjectProperty | |
| public final ObjectProperty | Returns: the on selection changed event handler propertyThe event handler that is associated with a selection on the tab. |
| public final <E extends Event> void | removeEventFilter(EventType<E>
the event type from which to unregister eventType, EventHandler<? super E> the event filter eventFilter)Overrides default javafx. Unregisters a previously registered event filter from this target. |
| public final <E extends Event> void | removeEventHandler(EventType<E>
the event type from which to unregister eventType, EventHandler<? super E> the event handler eventHandler)Overrides default javafx. Unregisters a previously registered event handler from this target. |
| public final ReadOnlyBooleanProperty | |
| private ReadOnlyBooleanWrapper | |
| public final void | |
| public final void | |
| public final void | setContextMenu(ContextMenu
the context menu value)Specifies the context menu to show when the user right-clicks on the tab. |
| public final void | |
| private final void | |
| pack-priv <E extends Event> void | |
| public final void | setGraphic(Node
the graphic node value)Sets the graphic to show in the tab to allow the user to differentiate between the function of each tab. |
| public final void | |
| public final void | setOnClosed(EventHandler<Event>
the on closed event handler value)Defines a function to be called when the tab is closed. |
| public void | |
| public final void | setOnSelectionChanged(EventHandler<Event>
the on selection changed event handler value)Defines a function to be called when a selection changed has occurred on the tab. |
| pack-priv final void | |
| public final void | |
| pack-priv final void | |
| public final void | |
| public final void | setTooltip(Tooltip
the tool tip value value)Specifies the tooltip to show when the user hovers over the tab. |
| public void | setUserData(Object
The value to be stored - this can later be retrieved by calling
value)Tab#getUserData().Convenience method for setting a single Object property that can be retrieved at a later date. |
| public final StringProperty | Returns: the CSS style string property associated to this tabThe CSS style string associated to this tab. |
| public final ReadOnlyObjectProperty | |
| private ReadOnlyObjectWrapper | |
| public final StringProperty | |
| public final ObjectProperty | |
| private void |
| closable | back to summary |
|---|---|
| private BooleanProperty closable | |
| CLOSED_EVENT | back to summary |
|---|---|
| public static final EventType<Event> CLOSED_EVENT Called when a user closes this tab. This is useful for freeing up memory. | |
| content | back to summary |
|---|---|
| private ObjectProperty<Node> content | |
| contextMenu | back to summary |
|---|---|
| private ObjectProperty<ContextMenu> contextMenu | |
| DEFAULT_STYLE_CLASS | back to summary |
|---|---|
| private static final String DEFAULT_STYLE_CLASS | |
| disable | back to summary |
|---|---|
| private BooleanProperty disable | |
| disabled | back to summary |
|---|---|
| private ReadOnlyBooleanWrapper disabled | |
| eventHandlerManager | back to summary |
|---|---|
| private final EventHandlerManager eventHandlerManager | |
| graphic | back to summary |
|---|---|
| private ObjectProperty<Node> graphic | |
| id | back to summary |
|---|---|
| private StringProperty id | |
| onClosed | back to summary |
|---|---|
| private ObjectProperty<EventHandler<Event>> onClosed | |
| onCloseRequest | back to summary |
|---|---|
| private ObjectProperty<EventHandler<Event>> onCloseRequest Called when there is an external request to close this
| |
| onSelectionChanged | back to summary |
|---|---|
| private ObjectProperty<EventHandler<Event>> onSelectionChanged | |
| parentDisabledChangedListener | back to summary |
|---|---|
| private final InvalidationListener parentDisabledChangedListener | |
| properties | back to summary |
|---|---|
| private ObservableMap<Object, Object> properties | |
| selected | back to summary |
|---|---|
| private ReadOnlyBooleanWrapper selected | |
| SELECTION_CHANGED_EVENT | back to summary |
|---|---|
| public static final EventType<Event> SELECTION_CHANGED_EVENT Called when the tab becomes selected or unselected. | |
| style | back to summary |
|---|---|
| private StringProperty style | |
| styleClass | back to summary |
|---|---|
| private final ObservableList<String> styleClass | |
| TAB_CLOSE_REQUEST_EVENT | back to summary |
|---|---|
| public static final EventType<Event> TAB_CLOSE_REQUEST_EVENT Called when there is an external request to close this
| |
| tabPane | back to summary |
|---|---|
| private ReadOnlyObjectWrapper<TabPane> tabPane | |
| text | back to summary |
|---|---|
| private StringProperty text | |
| tooltip | back to summary |
|---|---|
| private ObjectProperty<Tooltip> tooltip | |
| USER_DATA_KEY | back to summary |
|---|---|
| private static final Object USER_DATA_KEY | |
| Tab | back to summary |
|---|---|
| public Tab() Creates a tab with no title. | |
| Tab | back to summary |
|---|---|
| public Tab(String text) Creates a tab with a text title.
| |
| Tab | back to summary |
|---|---|
| public Tab(String text, Node content) Creates a tab with a text title and the specified content node. | |
| addEventFilter | back to summary |
|---|---|
| public final <E extends Event> void addEventFilter(EventType<E> eventType, EventHandler<? super E> eventFilter) Overrides default javafx. Doc from javafx. Registers an event filter for this target.
The filter is called when the target receives an
| |
| addEventHandler | back to summary |
|---|---|
| public final <E extends Event> void addEventHandler(EventType<E> eventType, EventHandler<? super E> eventHandler) Overrides default javafx. Doc from javafx. Registers an event handler for this target.
The handler is called when the target receives an
| |
| buildEventDispatchChain | back to summary |
|---|---|
| public EventDispatchChain buildEventDispatchChain(EventDispatchChain tail) Implements javafx. Doc from javafx. Construct an event dispatch chain for this target. The event dispatch
chain contains event dispatchers which might be interested in processing
of events targeted at this In the case the event target is part of some hierarchy, the chain for it is usually built from event dispatchers collected from the root of the hierarchy to the event target. The event dispatch chain is constructed by modifications to the provided initial event dispatch chain. The returned chain should have the initial chain at its end so the dispatchers should be prepended to the initial chain. The caller shouldn't assume that the initial chain remains unchanged nor that the returned value will reference a different chain.
| |
| closableProperty | back to summary |
|---|---|
| public final BooleanProperty closableProperty() The closable state for this tab.
| |
| contentProperty | back to summary |
|---|---|
| public final ObjectProperty The content associated with the tab.
| |
| contextMenuProperty | back to summary |
|---|---|
| public final ObjectProperty The context menu associated with the tab.
| |
| disabledProperty | back to summary |
|---|---|
| public final ReadOnlyBooleanProperty disabledProperty() Indicates whether or not this
| |
| disabledPropertyImpl | back to summary |
|---|---|
| private ReadOnlyBooleanWrapper disabledPropertyImpl() | |
| disableProperty | back to summary |
|---|---|
| public final BooleanProperty disableProperty() Sets the disabled state of this tab. A disable tab is no longer interactive
or traversable, but the contents remain interactive. A disable tab
can be selected using
| |
| getClassCssMetaData | back to summary |
|---|---|
| public static List Gets the
| |
| getContent | back to summary |
|---|---|
| public final Node getContent() The content associated with the tab.
| |
| getContextMenu | back to summary |
|---|---|
| public final ContextMenu getContextMenu() The context menu associated with the tab.
| |
| getCssMetaData | back to summary |
|---|---|
| public List Implements javafx. Doc from javafx. The CssMetaData of this Styleable. This may be returned as an unmodifiable list.
| |
| getGraphic | back to summary |
|---|---|
| public final Node getGraphic() The graphic shown in the tab.
| |
| getId | back to summary |
|---|---|
| public final String getId() Implements javafx. The id of this tab. | |
| getOnClosed | back to summary |
|---|---|
| public final EventHandler The event handler that is associated with the tab when the tab is closed.
| |
| getOnCloseRequest | back to summary |
|---|---|
| public EventHandler | |
| getOnSelectionChanged | back to summary |
|---|---|
| public final EventHandler The event handler that is associated with a selection on the tab.
| |
| getProperties | back to summary |
|---|---|
| public final ObservableMap Returns an observable map of properties on this Tab for use primarily by application developers.
| |
| getPseudoClassStates | back to summary |
|---|---|
| public final ObservableSet Implements javafx. Doc from javafx. Return the pseudo-class state of this Styleable. CSS assumes this set is read-only.
| |
| getStyle | back to summary |
|---|---|
| public final String getStyle() Implements javafx. The CSS style string associated to this tab. | |
| getStyleableParent | back to summary |
|---|---|
| public Styleable getStyleableParent() Implements javafx. Doc from javafx. Return the parent of this Styleable, or null if there is no parent. | |
| getStyleClass | back to summary |
|---|---|
| public ObservableList Implements javafx. 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.
| |
| getTabPane | back to summary |
|---|---|
| public final TabPane getTabPane() A reference to the TabPane that contains this tab instance.
| |
| getText | back to summary |
|---|---|
| public final String getText() The text shown in the tab.
| |
| getTooltip | back to summary |
|---|---|
| public final Tooltip getTooltip() The tooltip associated with this tab.
| |
| getTypeSelector | back to summary |
|---|---|
| public String getTypeSelector() Implements javafx. Doc from javafx. The type of this | |
| getUserData | back to summary |
|---|---|
| public Object getUserData() Returns a previously set Object property, or null if no such property
has been set using the
| |
| graphicProperty | back to summary |
|---|---|
| public final ObjectProperty The graphic in the tab.
| |
| hasProperties | back to summary |
|---|---|
| public boolean hasProperties() Tests if this Tab has properties.
| |
| idProperty | back to summary |
|---|---|
| public final StringProperty idProperty() The id of this tab.
| |
| isClosable | back to summary |
|---|---|
| public final boolean isClosable() Returns
| |
| isDisable | back to summary |
|---|---|
| public final boolean isDisable() Returns
| |
| isDisabled | back to summary |
|---|---|
| public final boolean isDisabled() Returns true when the
| |
| isSelected | back to summary |
|---|---|
| public final boolean isSelected() Represents whether this tab is the currently selected tab,
To change the selected Tab use
| |
| lookup | back to summary |
|---|---|
| pack-priv Node lookup(String selector) | |
| lookupAll | back to summary |
|---|---|
| pack-priv List | |
| onClosedProperty | back to summary |
|---|---|
| public final ObjectProperty The event handler that is associated with the tab when the tab is closed.
| |
| onCloseRequestProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| onSelectionChangedProperty | back to summary |
|---|---|
| public final ObjectProperty The event handler that is associated with a selection on the tab.
| |
| removeEventFilter | back to summary |
|---|---|
| public final <E extends Event> void removeEventFilter(EventType<E> eventType, EventHandler<? super E> eventFilter) Overrides default javafx. Doc from javafx. Unregisters a previously registered event filter from this target.
Since it is possible to register a single
| |
| removeEventHandler | back to summary |
|---|---|
| public final <E extends Event> void removeEventHandler(EventType<E> eventType, EventHandler<? super E> eventHandler) Overrides default javafx. Doc from javafx. Unregisters a previously registered event handler from this target.
Since it is possible to register a single
| |
| selectedProperty | back to summary |
|---|---|
| public final ReadOnlyBooleanProperty selectedProperty() The currently selected tab.
| |
| selectedPropertyImpl | back to summary |
|---|---|
| private ReadOnlyBooleanWrapper selectedPropertyImpl() | |
| setClosable | back to summary |
|---|---|
| public final void setClosable(boolean value) Sets
| |
| setContent | back to summary |
|---|---|
| public final void setContent(Node value) The content to show within the main TabPane area. The content can be any Node such as UI controls or groups of nodes added to a layout container.
| |
| setContextMenu | back to summary |
|---|---|
| public final void setContextMenu(ContextMenu value) Specifies the context menu to show when the user right-clicks on the tab.
| |
| setDisable | back to summary |
|---|---|
| public final void setDisable(boolean value) Sets the disabled state of this tab.
| |
| setDisabled | back to summary |
|---|---|
| private final void setDisabled(boolean value) | |
| setEventHandler | back to summary |
|---|---|
| pack-priv <E extends Event> void setEventHandler(EventType<E> eventType, EventHandler<E> eventHandler) | |
| setGraphic | back to summary |
|---|---|
| public final void setGraphic(Node value) Sets the graphic to show in the tab to allow the user to differentiate between the function of each tab. By default the graphic does not rotate based on the TabPane.tabPosition value, but it can be set to rotate by setting TabPane.rotateGraphic to true.
| |
| setId | back to summary |
|---|---|
| public final void setId(String value) Sets the id of this tab. This simple string identifier is useful for
finding a specific Tab within the
| |
| setOnClosed | back to summary |
|---|---|
| public final void setOnClosed(EventHandler<Event> value) Defines a function to be called when the tab is closed.
| |
| setOnCloseRequest | back to summary |
|---|---|
| public void setOnCloseRequest(EventHandler<Event> value) | |
| setOnSelectionChanged | back to summary |
|---|---|
| public final void setOnSelectionChanged(EventHandler<Event> value) Defines a function to be called when a selection changed has occurred on the tab.
| |
| setSelected | back to summary |
|---|---|
| pack-priv final void setSelected(boolean value) | |
| setStyle | back to summary |
|---|---|
| public final void setStyle(String value) A string representation of the CSS style associated with this tab. 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. Parsing this style might not be supported on some limited platforms. It is recommended to use a standalone CSS file instead.
| |
| setTabPane | back to summary |
|---|---|
| pack-priv final void setTabPane(TabPane value) | |
| setText | back to summary |
|---|---|
| public final void setText(String value) Sets the text to show in the tab to allow the user to differentiate between the function of each tab. The text is always visible
| |
| setTooltip | back to summary |
|---|---|
| public final void setTooltip(Tooltip value) Specifies the tooltip to show when the user hovers over the tab.
| |
| setUserData | back to summary |
|---|---|
| public void setUserData(Object value) Convenience method for setting a single Object property that can be
retrieved at a later date. This is functionally equivalent to calling
the getProperties().put(Object key, Object value) method. This can later
be retrieved by calling
| |
| styleProperty | back to summary |
|---|---|
| public final StringProperty styleProperty() The CSS style string associated to this tab.
| |
| tabPaneProperty | back to summary |
|---|---|
| public final ReadOnlyObjectProperty The TabPane that contains this tab.
| |
| tabPanePropertyImpl | back to summary |
|---|---|
| private ReadOnlyObjectWrapper | |
| textProperty | back to summary |
|---|---|
| public final StringProperty textProperty() The text shown in the tab.
| |
| tooltipProperty | back to summary |
|---|---|
| public final ObjectProperty The tooltip associated with this tab.
| |
| updateDisabled | back to summary |
|---|---|
| private void updateDisabled() | |