Class PamTabFX

java.lang.Object
javafx.scene.control.Tab
pamViewFX.fxNodes.PamTabFX
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget
Direct Known Subclasses:
PamGuiTabFX

public class PamTabFX extends javafx.scene.control.Tab
A draggable tab that can optionally be detached from its tab pane and shown in a separate window. This can be added to any normal PamTabPane, however a PamTabPane with draggable tabs must *only* have DraggableTabs, normal tabs and DrragableTabs mixed will cause issues!

Author:
Michael Berry, Jamie Macaulay
  • Property Summary

    Properties inherited from class javafx.scene.control.Tab

    closable, content, contextMenu, disabled, disable, graphic, id, onClosed, onCloseRequest, onSelectionChanged, selected, style, tabPane, text, tooltip
  • Field Summary

    Fields inherited from class javafx.scene.control.Tab

    CLOSED_EVENT, SELECTION_CHANGED_EVENT, TAB_CLOSE_REQUEST_EVENT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new draggable tab.
  • Method Summary

    Modifier and Type
    Method
    Description
    javafx.scene.layout.Pane
    createNewPane(javafx.scene.control.Tab tab, PamTabPane PamTabPane, javafx.stage.Stage newStage)
    Called whenever a new stage is being created.
    javafx.scene.control.Label
     
    void
    setDetachable(boolean detachable)
    Set whether it's possible to detach the tab from its pane and move it to another pane or another window.
    void
    Set the label text on this draggable tab.

    Methods inherited from class javafx.scene.control.Tab

    addEventFilter, addEventHandler, buildEventDispatchChain, closableProperty, contentProperty, contextMenuProperty, disabledProperty, disableProperty, getClassCssMetaData, getContent, getContextMenu, getCssMetaData, getGraphic, getId, getOnClosed, getOnCloseRequest, getOnSelectionChanged, getProperties, getPseudoClassStates, getStyle, getStyleableParent, getStyleClass, getTabPane, getText, getTooltip, getTypeSelector, getUserData, graphicProperty, hasProperties, idProperty, isClosable, isDisable, isDisabled, isSelected, onClosedProperty, onCloseRequestProperty, onSelectionChangedProperty, removeEventFilter, removeEventHandler, selectedProperty, setClosable, setContent, setContextMenu, setDisable, setGraphic, setId, setOnClosed, setOnCloseRequest, setOnSelectionChanged, setStyle, setText, setTooltip, setUserData, styleProperty, tabPaneProperty, textProperty, tooltipProperty

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Constructor Details

    • PamTabFX

      public PamTabFX(String text)
      Create a new draggable tab. This can be added to any normal PamTabPane, however a PamTabPane with draggable tabs must *only* have DraggableTabs, normal tabs and DrragableTabs mixed will cause issues!

      Parameters:
      text - the text to appear on the tag label.
  • Method Details

    • createNewPane

      public javafx.scene.layout.Pane createNewPane(javafx.scene.control.Tab tab, PamTabPane PamTabPane, javafx.stage.Stage newStage)
      Called whenever a new stage is being created. Add the new pane to the new stage. By default this is simply a new tab pane but this function can be overridden for more complex panes.
    • setDetachable

      public void setDetachable(boolean detachable)
      Set whether it's possible to detach the tab from its pane and move it to another pane or another window. Defaults to true.

      Parameters:
      detachable - true if the tab should be detachable, false otherwise.
    • setLabelText

      public void setLabelText(String text)
      Set the label text on this draggable tab. This must be used instead of setText() to set the label, otherwise weird side effects will result!

      Parameters:
      text - the label text for this tab.
    • getLabel

      public javafx.scene.control.Label getLabel()