public class TearableTabPane
extends javafx.scene.control.TabPane
implements java.lang.AutoCloseable
It relies on the TearableTabPane.TabPaneManager class to keep track of all tabs spread over many windows and TabPane instances
TODO: Reordering of the tabs is currently not implemented.
rotateGraphicProperty, selectionModelProperty, sideProperty, tabClosingPolicyProperty, tabMaxHeightProperty, tabMaxWidthProperty, tabMinHeightProperty, tabMinWidthPropertycontextMenuProperty, skinClassNameProperty, skinProperty, tooltipPropertybackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, heightProperty, insetsProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, opaqueInsetsProperty, paddingProperty, prefHeightProperty, prefWidthProperty, scaleShapeProperty, shapeProperty, snapToPixelProperty, widthPropertyimpl_traversalEngineProperty, needsLayoutPropertyaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, impl_treeVisibleProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty| Modifier and Type | Class and Description |
|---|---|
protected static class |
TearableTabPane.TabPaneManager
A class that represents the state of the tabs across all TabPane windows
|
| Constructor and Description |
|---|
TearableTabPane()
Initializes a new instance of the
TearableTabPane class. |
TearableTabPane(TearableTabPane.TabPaneManager manager,
boolean reorderable,
boolean tearable,
javafx.scene.control.Tab... tabs)
Initializes a new instance of the
TearableTabPane class. |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllTabs()
Clears the list of tabs.
|
void |
close() |
javafx.scene.input.DataFormat |
getDataFormat()
Returns the generated
DataFormat used to identify drag and drop operations across panes sharing the same TearableTabPane.TabPaneManager |
javafx.collections.ObservableList<javafx.scene.control.Tab> |
getGlobalTabs()
Returns a list of all tabs, across of panes sharing the same
TearableTabPane.TabPaneManager |
java.util.function.Function<javafx.event.ActionEvent,java.util.Optional<javafx.scene.control.Tab>> |
getNewTabFactory()
Returns the factory for creating new tabs
|
javafx.scene.control.Tab |
getSelectedTab()
Returns the tab currently selected.
|
javafx.scene.control.TabPane |
getSelectedTabPane()
Returns the pane containing the tab currently selected.
|
boolean |
isReorderable()
Returns true if tabs can be reordered, false otherwise.
|
boolean |
isTearable()
Returns true if tabs can be teared away from the pane, false otherwise.
|
void |
setNewTabFactory(java.util.function.Function<javafx.event.ActionEvent,java.util.Optional<javafx.scene.control.Tab>> newTabFactory)
Sets the factory for creating new tabs
|
void |
setOnAddNewTab(javafx.event.EventHandler<javafx.event.ActionEvent> onAddNewTab)
Sets the action that should be fired on the addition of a tab to the pane.
|
void |
setOnClosingWindow(javafx.event.EventHandler<javafx.stage.WindowEvent> action)
Sets the action to be fired on closing a window hosting tabs.
|
void |
setOnOpenNewWindow(javafx.event.EventHandler<javafx.stage.WindowEvent> action)
Sets the action to be fired on opening a new window to host tabs.
|
void |
setReorderable(boolean reorderable)
Set to true if tabs can be reordered, false otherwise.
|
void |
setTearable(boolean tearable)
Set to true if tabs can be teared away from the pane, false otherwise.
|
createDefaultSkin, getClassCssMetaData, getControlCssMetaData, getSelectionModel, getSide, getTabClosingPolicy, getTabMaxHeight, getTabMaxWidth, getTabMinHeight, getTabMinWidth, getTabs, isRotateGraphic, lookup, lookupAll, rotateGraphicProperty, selectionModelProperty, setRotateGraphic, setSelectionModel, setSide, setTabClosingPolicy, setTabMaxHeight, setTabMaxWidth, setTabMinHeight, setTabMinWidth, sideProperty, tabClosingPolicyProperty, tabMaxHeightProperty, tabMaxWidthProperty, tabMinHeightProperty, tabMinWidthPropertycomputeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getSkin, getTooltip, impl_cssGetFocusTraversableInitialValue, impl_processCSS, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipPropertybackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapSize, snapSpace, snapToPixelProperty, widthPropertygetChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, needsLayoutProperty, requestLayout, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBoundsaccessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visiblePropertypublic TearableTabPane()
TearableTabPane class.public TearableTabPane(TearableTabPane.TabPaneManager manager, boolean reorderable, boolean tearable, javafx.scene.control.Tab... tabs)
TearableTabPane class.manager - the TearableTabPane.TabPaneManager manager instancereorderable - true if tabs can be reordered, false otherwise.tearable - true if tabs are teared away from the pane, false otherwise.tabs - tabs to attached to the TabPane.public java.util.function.Function<javafx.event.ActionEvent,java.util.Optional<javafx.scene.control.Tab>> getNewTabFactory()
public void setNewTabFactory(java.util.function.Function<javafx.event.ActionEvent,java.util.Optional<javafx.scene.control.Tab>> newTabFactory)
newTabFactory - the factory for creating new tabspublic void setOnAddNewTab(javafx.event.EventHandler<javafx.event.ActionEvent> onAddNewTab)
onAddNewTab - the actions that should be fired on the addition of a tab to the pane.public boolean isTearable()
public void setTearable(boolean tearable)
tearable - true if tabs can be teared away from the pane, false otherwise.public boolean isReorderable()
public void setReorderable(boolean reorderable)
reorderable - true if tabs can be reordered, false otherwise.public javafx.scene.control.Tab getSelectedTab()
public javafx.scene.control.TabPane getSelectedTabPane()
public javafx.collections.ObservableList<javafx.scene.control.Tab> getGlobalTabs()
TearableTabPane.TabPaneManagerTearableTabPane.TabPaneManagerpublic void clearAllTabs()
public void setOnOpenNewWindow(javafx.event.EventHandler<javafx.stage.WindowEvent> action)
action - the action to be fired on opening a new window to host tabs.public void setOnClosingWindow(javafx.event.EventHandler<javafx.stage.WindowEvent> action)
action - the action to be fired on closing a window hosting tabs.public javafx.scene.input.DataFormat getDataFormat()
DataFormat used to identify drag and drop operations across panes sharing the same TearableTabPane.TabPaneManagerDataFormat used to identify drag and drop operations across panes sharing the same TearableTabPane.TabPaneManagerpublic void close()
close in interface java.lang.AutoCloseableCopyright © 2018 Frederic Thevenet. All rights reserved.