java.lang.Object
atlantafx.base.controls.Tab
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classResizes the tabs to a fixed width when there is available space; otherwise, it proportionally shrinks the tab width.static classstatic interfaceDescribes the closing policies for tabs.static classResizes the tabs to a computed width, requiring the user to scroll horizontally if the total width exceeds the visible width of the tab line.static enumDescribes the drag policies for tabs.static classResizes the tabs to a fixed width, requiring the user to scroll horizontally if the total width exceeds the visible width of the tab line.static classstatic interfaceTheTab.ResizePolicyinterface defines the strategy for calculating the width of tabs in theTabLinecontrol.static classstatic classResizes the tabs to fill all available space proportionally. -
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.ContextMenu> The context menu associated with the tab.final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.Node> The graphic to show in the tab to allow the user to differentiate between the function of each tab.final javafx.beans.property.StringPropertyThe simple string identifier for finding a specific tab.final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> The event handler that is associated with the tab when the tab is closed.final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> The event handler that is called when there is an external request to close this tab.final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> The event handler that is associated with a selection on the tab.final javafx.beans.property.BooleanPropertyThe pinned state for this tab.final javafx.beans.property.ReadOnlyBooleanPropertyThe currently selected tab.final javafx.beans.property.StringPropertyThe CSS style string associated to this tab.final javafx.beans.property.ReadOnlyObjectProperty<@Nullable TabLine> The TabLine that contains this tab.final javafx.beans.property.StringPropertyThe text to show in the tab to allow the user to differentiate between the function of each tab.final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.Tooltip> The tooltip associated with this tab. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final javafx.event.EventType<javafx.event.Event> Called when a user closes this tab.protected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.ContextMenu> protected static final Stringprotected final EventHandlerManagerprotected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.scene.Node> protected @Nullable javafx.beans.property.StringPropertyprotected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> protected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> protected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> protected @Nullable javafx.beans.property.BooleanPropertyprotected @Nullable javafx.beans.property.ReadOnlyBooleanWrapperstatic final javafx.event.EventType<javafx.event.Event> Called when the tab becomes selected or unselected.protected @Nullable javafx.beans.property.StringPropertyprotected final javafx.collections.ObservableList<String> static final javafx.event.EventType<javafx.event.Event> Called when there is an external request to close thisTab.protected @Nullable javafx.beans.property.StringPropertyprotected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.Tooltip> protected static final Object -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal <E extends javafx.event.Event>
voidaddEventFilter(javafx.event.EventType<E> eventType, javafx.event.EventHandler<? super E> eventFilter) final <E extends javafx.event.Event>
voidaddEventHandler(javafx.event.EventType<E> eventType, javafx.event.EventHandler<? super E> eventHandler) javafx.event.EventDispatchChainbuildEventDispatchChain(javafx.event.EventDispatchChain chain) final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.ContextMenu> The context menu associated with the tab.static List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> Gets theCssMetaDataassociated with this class, which may include theCssMetaDataof its superclasses.@Nullable javafx.scene.control.ContextMenuGets the value of thecontextMenuproperty.List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> @Nullable javafx.scene.NodeGets the value of thegraphicproperty.@Nullable StringgetId()Gets the value of theidproperty.@Nullable javafx.event.EventHandler<javafx.event.Event> Gets the value of theonClosedproperty.@Nullable javafx.event.EventHandler<javafx.event.Event> Gets the value of theonCloseRequestproperty.@Nullable javafx.event.EventHandler<javafx.event.Event> Gets the value of theonSelectionChangedproperty.Returns an observable map of properties on this Tab for use primarily by application developers.final javafx.collections.ObservableSet<javafx.css.PseudoClass> @Nullable StringgetStyle()Gets the value of thestyleproperty.@Nullable javafx.css.Styleablejavafx.collections.ObservableList<String> @Nullable TabLineGets the value of thetabLineproperty.@Nullable StringgetText()Gets the value of thetextproperty.@Nullable javafx.scene.control.TooltipGets the value of thetooltipproperty.Returns a previously set Object property, or null if no such property has been set using thesetUserData(Object)method.final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.Node> The graphic to show in the tab to allow the user to differentiate between the function of each tab.booleanTests if this Tab has properties.final javafx.beans.property.StringPropertyThe simple string identifier for finding a specific tab.booleanisPinned()Gets the value of thepinnedproperty.booleanGets the value of theselectedproperty.final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> The event handler that is associated with the tab when the tab is closed.final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> The event handler that is called when there is an external request to close this tab.final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> The event handler that is associated with a selection on the tab.final javafx.beans.property.BooleanPropertyThe pinned state for this tab.final <E extends javafx.event.Event>
voidremoveEventFilter(javafx.event.EventType<E> eventType, javafx.event.EventHandler<? super E> eventFilter) final <E extends javafx.event.Event>
voidremoveEventHandler(javafx.event.EventType<E> eventType, javafx.event.EventHandler<? super E> eventHandler) final javafx.beans.property.ReadOnlyBooleanPropertyThe currently selected tab.protected javafx.beans.property.ReadOnlyBooleanWrappervoidsetContextMenu(@Nullable javafx.scene.control.ContextMenu value) Sets the value of thecontextMenuproperty.protected <E extends javafx.event.Event>
voidsetEventHandler(javafx.event.EventType<E> eventType, @Nullable javafx.event.EventHandler<E> eventHandler) voidsetGraphic(@Nullable javafx.scene.Node value) Sets the value of thegraphicproperty.voidSets the value of theidproperty.voidsetOnClosed(@Nullable javafx.event.EventHandler<javafx.event.Event> value) Sets the value of theonClosedproperty.voidsetOnCloseRequest(@Nullable javafx.event.EventHandler<javafx.event.Event> value) Sets the value of theonCloseRequestproperty.voidsetOnSelectionChanged(@Nullable javafx.event.EventHandler<javafx.event.Event> value) Sets the value of theonSelectionChangedproperty.voidsetPinned(boolean value) Sets the value of thepinnedproperty.voidSets the value of thestyleproperty.voidSets the value of thetextproperty.voidsetTooltip(@Nullable javafx.scene.control.Tooltip value) Sets the value of thetooltipproperty.voidsetUserData(Object value) Convenience method for setting a single Object property that can be retrieved at a later date.final javafx.beans.property.StringPropertyThe CSS style string associated to this tab.final javafx.beans.property.ReadOnlyObjectProperty<@Nullable TabLine> The TabLine that contains this tab.final javafx.beans.property.StringPropertyThe text to show in the tab to allow the user to differentiate between the function of each tab.final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.Tooltip> The tooltip associated with this tab.protected voidupdateSelected(boolean value) protected voidupdateTabLine(@Nullable TabLine value) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
id
public final javafx.beans.property.StringProperty idPropertyThe simple string identifier for finding a specific tab. The default value isnull.- See Also:
-
style
public final javafx.beans.property.StringProperty stylePropertyThe CSS style string associated to this tab.- See Also:
-
selected
public final javafx.beans.property.ReadOnlyBooleanProperty selectedPropertyThe currently selected tab.- See Also:
-
text
public final javafx.beans.property.StringProperty textPropertyThe text to show in the tab to allow the user to differentiate between the function of each tab. The text is always visible.- See Also:
-
graphic
public final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.Node> graphicPropertyThe graphic to show in the tab to allow the user to differentiate between the function of each tab.- See Also:
-
contextMenu
public final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.ContextMenu> contextMenuPropertyThe context menu associated with the tab.- See Also:
-
pinned
public final javafx.beans.property.BooleanProperty pinnedPropertyThe pinned state for this tab. The default isfalse.- See Also:
-
onSelectionChanged
public final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> onSelectionChangedPropertyThe event handler that is associated with a selection on the tab.- See Also:
-
onClosed
public final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> onClosedPropertyThe event handler that is associated with the tab when the tab is closed.- See Also:
-
tooltip
public final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.Tooltip> tooltipPropertyThe tooltip associated with this tab.- See Also:
-
onCloseRequest
public final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> onCloseRequestPropertyThe event handler that is called when there is an external request to close this tab. The installed event handler can prevent tab closing by consuming the received event.- See Also:
-
tabLine
The TabLine that contains this tab.- See Also:
-
-
Field Details
-
DEFAULT_STYLE_CLASS
- See Also:
-
SELECTION_CHANGED_EVENT
public static final javafx.event.EventType<javafx.event.Event> SELECTION_CHANGED_EVENTCalled when the tab becomes selected or unselected. -
CLOSED_EVENT
public static final javafx.event.EventType<javafx.event.Event> CLOSED_EVENTCalled when a user closes this tab. -
TAB_CLOSE_REQUEST_EVENT
public static final javafx.event.EventType<javafx.event.Event> TAB_CLOSE_REQUEST_EVENTCalled when there is an external request to close thisTab. The installed event handler thus can prevent tab closing by consuming the received event. -
id
@Nullable protected @Nullable javafx.beans.property.StringProperty id -
style
@Nullable protected @Nullable javafx.beans.property.StringProperty style -
selected
@Nullable protected @Nullable javafx.beans.property.ReadOnlyBooleanWrapper selected -
text
@Nullable protected @Nullable javafx.beans.property.StringProperty text -
graphic
@Nullable protected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.scene.Node> graphic -
contextMenu
@Nullable protected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.ContextMenu> contextMenu -
pinned
@Nullable protected @Nullable javafx.beans.property.BooleanProperty pinned -
onSelectionChanged
@Nullable protected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> onSelectionChanged -
onClosed
@Nullable protected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> onClosed -
tooltip
@Nullable protected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.Tooltip> tooltip -
onCloseRequest
@Nullable protected @Nullable javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> onCloseRequest -
USER_DATA_KEY
-
properties
-
eventHandlerManager
-
styleClass
-
-
Constructor Details
-
Tab
public Tab()Creates an empty tab. -
Tab
-
Tab
-
Tab
-
-
Method Details
-
idProperty
public final javafx.beans.property.StringProperty idProperty()The simple string identifier for finding a specific tab. The default value isnull.- Returns:
- the
idproperty - See Also:
-
getId
Gets the value of theidproperty.- Specified by:
getIdin interfacejavafx.css.Styleable- Property description:
- The simple string identifier for finding a specific tab.
The default value is
null. - Returns:
- the value of the
idproperty - See Also:
-
setId
Sets the value of theidproperty.- Property description:
- The simple string identifier for finding a specific tab.
The default value is
null. - Parameters:
value- the value for theidproperty- See Also:
-
styleProperty
public final javafx.beans.property.StringProperty styleProperty()The CSS style string associated to this tab.- Returns:
- the
styleproperty - See Also:
-
getStyle
Gets the value of thestyleproperty.- Specified by:
getStylein interfacejavafx.css.Styleable- Property description:
- The CSS style string associated to this tab.
- Returns:
- the value of the
styleproperty - See Also:
-
setStyle
Sets the value of thestyleproperty.- Property description:
- The CSS style string associated to this tab.
- Parameters:
value- the value for thestyleproperty- See Also:
-
selectedProperty
public final javafx.beans.property.ReadOnlyBooleanProperty selectedProperty()The currently selected tab.- Returns:
- the
selectedproperty - See Also:
-
selectedPropertyImpl
protected javafx.beans.property.ReadOnlyBooleanWrapper selectedPropertyImpl() -
isSelected
public boolean isSelected()Gets the value of theselectedproperty.- Property description:
- The currently selected tab.
- Returns:
- the value of the
selectedproperty - See Also:
-
updateSelected
protected void updateSelected(boolean value) -
textProperty
public final javafx.beans.property.StringProperty textProperty()The text to show in the tab to allow the user to differentiate between the function of each tab. The text is always visible.- Returns:
- the
textproperty - See Also:
-
getText
Gets the value of thetextproperty.- Property description:
- The text to show in the tab to allow the user to differentiate between the function of each tab. The text is always visible.
- Returns:
- the value of the
textproperty - See Also:
-
setText
Sets the value of thetextproperty.- Property description:
- The text to show in the tab to allow the user to differentiate between the function of each tab. The text is always visible.
- Parameters:
value- the value for thetextproperty- See Also:
-
graphicProperty
public final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.Node> graphicProperty()The graphic to show in the tab to allow the user to differentiate between the function of each tab.- Returns:
- the
graphicproperty - See Also:
-
getGraphic
@Nullable public @Nullable javafx.scene.Node getGraphic()Gets the value of thegraphicproperty.- Property description:
- The graphic to show in the tab to allow the user to differentiate between the function of each tab.
- Returns:
- the value of the
graphicproperty - See Also:
-
setGraphic
public void setGraphic(@Nullable @Nullable javafx.scene.Node value) Sets the value of thegraphicproperty.- Property description:
- The graphic to show in the tab to allow the user to differentiate between the function of each tab.
- Parameters:
value- the value for thegraphicproperty- See Also:
-
contextMenuProperty
public final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.ContextMenu> contextMenuProperty()The context menu associated with the tab.- Returns:
- the
contextMenuproperty - See Also:
-
getContextMenu
@Nullable public @Nullable javafx.scene.control.ContextMenu getContextMenu()Gets the value of thecontextMenuproperty.- Property description:
- The context menu associated with the tab.
- Returns:
- the value of the
contextMenuproperty - See Also:
-
setContextMenu
public void setContextMenu(@Nullable @Nullable javafx.scene.control.ContextMenu value) Sets the value of thecontextMenuproperty.- Property description:
- The context menu associated with the tab.
- Parameters:
value- the value for thecontextMenuproperty- See Also:
-
pinnedProperty
public final javafx.beans.property.BooleanProperty pinnedProperty()The pinned state for this tab. The default isfalse.- Returns:
- the
pinnedproperty - See Also:
-
isPinned
public boolean isPinned()Gets the value of thepinnedproperty.- Property description:
- The pinned state for this tab.
The default is
false. - Returns:
- the value of the
pinnedproperty - See Also:
-
setPinned
public void setPinned(boolean value) Sets the value of thepinnedproperty.- Property description:
- The pinned state for this tab.
The default is
false. - Parameters:
value- the value for thepinnedproperty- See Also:
-
onSelectionChangedProperty
public final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> onSelectionChangedProperty()The event handler that is associated with a selection on the tab.- Returns:
- the
onSelectionChangedproperty - See Also:
-
getOnSelectionChanged
@Nullable public @Nullable javafx.event.EventHandler<javafx.event.Event> getOnSelectionChanged()Gets the value of theonSelectionChangedproperty.- Property description:
- The event handler that is associated with a selection on the tab.
- Returns:
- the value of the
onSelectionChangedproperty - See Also:
-
setOnSelectionChanged
public void setOnSelectionChanged(@Nullable @Nullable javafx.event.EventHandler<javafx.event.Event> value) Sets the value of theonSelectionChangedproperty.- Property description:
- The event handler that is associated with a selection on the tab.
- Parameters:
value- the value for theonSelectionChangedproperty- See Also:
-
onClosedProperty
public final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> onClosedProperty()The event handler that is associated with the tab when the tab is closed.- Returns:
- the
onClosedproperty - See Also:
-
getOnClosed
@Nullable public @Nullable javafx.event.EventHandler<javafx.event.Event> getOnClosed()Gets the value of theonClosedproperty.- Property description:
- The event handler that is associated with the tab when the tab is closed.
- Returns:
- the value of the
onClosedproperty - See Also:
-
setOnClosed
public void setOnClosed(@Nullable @Nullable javafx.event.EventHandler<javafx.event.Event> value) Sets the value of theonClosedproperty.- Property description:
- The event handler that is associated with the tab when the tab is closed.
- Parameters:
value- the value for theonClosedproperty- See Also:
-
tooltipProperty
public final javafx.beans.property.ObjectProperty<@Nullable javafx.scene.control.Tooltip> tooltipProperty()The tooltip associated with this tab.- Returns:
- the
tooltipproperty - See Also:
-
getTooltip
@Nullable public @Nullable javafx.scene.control.Tooltip getTooltip()Gets the value of thetooltipproperty.- Property description:
- The tooltip associated with this tab.
- Returns:
- the value of the
tooltipproperty - See Also:
-
setTooltip
public void setTooltip(@Nullable @Nullable javafx.scene.control.Tooltip value) Sets the value of thetooltipproperty.- Property description:
- The tooltip associated with this tab.
- Parameters:
value- the value for thetooltipproperty- See Also:
-
onCloseRequestProperty
public final javafx.beans.property.ObjectProperty<@Nullable javafx.event.EventHandler<javafx.event.Event>> onCloseRequestProperty()The event handler that is called when there is an external request to close this tab. The installed event handler can prevent tab closing by consuming the received event.- Returns:
- the
onCloseRequestproperty - See Also:
-
getOnCloseRequest
@Nullable public @Nullable javafx.event.EventHandler<javafx.event.Event> getOnCloseRequest()Gets the value of theonCloseRequestproperty.- Property description:
- The event handler that is called when there is an external request to close this tab. The installed event handler can prevent tab closing by consuming the received event.
- Returns:
- the value of the
onCloseRequestproperty - See Also:
-
setOnCloseRequest
public void setOnCloseRequest(@Nullable @Nullable javafx.event.EventHandler<javafx.event.Event> value) Sets the value of theonCloseRequestproperty.- Property description:
- The event handler that is called when there is an external request to close this tab. The installed event handler can prevent tab closing by consuming the received event.
- Parameters:
value- the value for theonCloseRequestproperty- See Also:
-
tabLineProperty
The TabLine that contains this tab.- Returns:
- the
tabLineproperty - See Also:
-
getTabLine
Gets the value of thetabLineproperty.- Property description:
- The TabLine that contains this tab.
- Returns:
- the value of the
tabLineproperty - See Also:
-
updateTabLine
-
getProperties
-
hasProperties
public boolean hasProperties()Tests if this Tab has properties. -
getUserData
Returns a previously set Object property, or null if no such property has been set using thesetUserData(Object)method. -
setUserData
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 callinggetUserData(). -
buildEventDispatchChain
public javafx.event.EventDispatchChain buildEventDispatchChain(javafx.event.EventDispatchChain chain) - Specified by:
buildEventDispatchChainin interfacejavafx.event.EventTarget
-
addEventHandler
public final <E extends javafx.event.Event> void addEventHandler(javafx.event.EventType<E> eventType, javafx.event.EventHandler<? super E> eventHandler) - Specified by:
addEventHandlerin interfacejavafx.event.EventTarget
-
removeEventHandler
public final <E extends javafx.event.Event> void removeEventHandler(javafx.event.EventType<E> eventType, javafx.event.EventHandler<? super E> eventHandler) - Specified by:
removeEventHandlerin interfacejavafx.event.EventTarget
-
addEventFilter
public final <E extends javafx.event.Event> void addEventFilter(javafx.event.EventType<E> eventType, javafx.event.EventHandler<? super E> eventFilter) - Specified by:
addEventFilterin interfacejavafx.event.EventTarget
-
removeEventFilter
public final <E extends javafx.event.Event> void removeEventFilter(javafx.event.EventType<E> eventType, javafx.event.EventHandler<? super E> eventFilter) - Specified by:
removeEventFilterin interfacejavafx.event.EventTarget
-
setEventHandler
protected <E extends javafx.event.Event> void setEventHandler(javafx.event.EventType<E> eventType, @Nullable @Nullable javafx.event.EventHandler<E> eventHandler) -
getTypeSelector
- Specified by:
getTypeSelectorin interfacejavafx.css.Styleable
-
getStyleClass
- Specified by:
getStyleClassin interfacejavafx.css.Styleable
-
getPseudoClassStates
public final javafx.collections.ObservableSet<javafx.css.PseudoClass> getPseudoClassStates()- Specified by:
getPseudoClassStatesin interfacejavafx.css.Styleable
-
getCssMetaData
- Specified by:
getCssMetaDatain interfacejavafx.css.Styleable
-
getStyleableParent
@Nullable public @Nullable javafx.css.Styleable getStyleableParent()- Specified by:
getStyleableParentin interfacejavafx.css.Styleable
-
getClassCssMetaData
Gets theCssMetaDataassociated with this class, which may include theCssMetaDataof its superclasses.
-