Package pamViewFX

Class PamGuiTabFX

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

public class PamGuiTabFX extends PamTabFX
Extends the PAMTabFX class so that a new stage with PamGui nodes appears when tab is dragged out of frame, rather than just a new tabPane as the primary pane.
Author:
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
    Modifier and Type
    Field
    Description
    static final int
    Sort panes vertically
    static final int
    Sort pane so they have equal x and y spacing.
    static final int
    Sort panes vertically

    Fields inherited from class javafx.scene.control.Tab

    CLOSED_EVENT, SELECTION_CHANGED_EVENT, TAB_CLOSE_REQUEST_EVENT
  • Constructor Summary

    Constructors
    Constructor
    Description
    PamGuiTabFX(TabInfo tabInfo, PamGuiFX pamGui)
    Constructor for a new tab
    PamGuiTabFX(TabInfo tabInfo, UserDisplayNodeFX newContent, PamGuiFX pamGui)
    Constructor for a new tab
  • Method Summary

    Modifier and Type
    Method
    Description
    pamViewFX.PamGuiTabFX.PamGuiInternalPane
    addInternalPane(javafx.scene.layout.Region pane)
    Add an internal pane to the tab.
    pamViewFX.PamGuiTabFX.PamGuiInternalPane
    Add an UserDisplayNodeFX to the graph.
    void
    autoSortPanes(int sortType)
    Sort panes.
    javafx.scene.layout.Pane
    createNewPane(javafx.scene.control.Tab tab, PamTabPane tabPane, javafx.stage.Stage newStage)
    Called whenever a new stage is being created.
    Get the content holder which holds the toolbar pane and the main tab content pane.
    Get the content tool bar.
    boolean
    Check whether internal panes are currently editable.
    ArrayList<pamViewFX.PamGuiTabFX.PamGuiInternalPane>
    Get all internal panes within a PamGui the tab's content holder./
    Convenience class for getting name of tabs.
    Tab information for the tab.
    boolean
     
    void
    Remove an internal pane if it contains the node
    void
    setMainContent(javafx.scene.layout.Region node)
    Set the main content node.
    void
    setPanesEditable(boolean editable)
    Set all internal panes to be manually resizable.
    void
    setResizableDisplays(boolean resize)
    Set the displays within the tab to be manually resized.
    void
    Set the toolbar pane.

    Methods inherited from class pamViewFX.fxNodes.PamTabFX

    getLabel, setDetachable, setLabelText

    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
  • Field Details

    • SORT_HORIZONTAL

      public static final int SORT_HORIZONTAL
      Sort panes vertically
      See Also:
    • SORT_VERTICAL

      public static final int SORT_VERTICAL
      Sort panes vertically
      See Also:
    • SORT_TILE

      public static final int SORT_TILE
      Sort pane so they have equal x and y spacing.
      See Also:
  • Constructor Details

    • PamGuiTabFX

      public PamGuiTabFX(TabInfo tabInfo, PamGuiFX pamGui)
      Constructor for a new tab
      Parameters:
      tabInfo - - info on the tab such as name
      pamGui - - reference to the PamGuiFX the pane belongs to.
    • PamGuiTabFX

      public PamGuiTabFX(TabInfo tabInfo, UserDisplayNodeFX newContent, PamGuiFX pamGui)
      Constructor for a new tab
      Parameters:
      tabInfo - - info on the tab such as name
      newContent - - content to display
      pamGui - - reference to the PamGuiFX the pane belongs to.
  • Method Details

    • setToolbar

      public void setToolbar(PamGuiFX.ToolBarPane toolBarPane)
      Set the toolbar pane. This is a narrow bar which sits just under the tab contians both generic and possibly tab specific controls.
      Parameters:
      toolBarPane - - the ToolBarPane to add.
    • setResizableDisplays

      public void setResizableDisplays(boolean resize)
      Set the displays within the tab to be manually resized.
      Parameters:
      toolBarPane - - true to allow manual resizing
    • setPanesEditable

      public void setPanesEditable(boolean editable)
      Set all internal panes to be manually resizable. Decorates each pane with nodes to allow the user to drag the pane and set height and width.
      Parameters:
      editable - - true to set edit mode. f
    • createNewPane

      public javafx.scene.layout.Pane createNewPane(javafx.scene.control.Tab tab, PamTabPane tabPane, javafx.stage.Stage newStage)
      Description copied from class: PamTabFX
      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.
      Overrides:
      createNewPane in class PamTabFX
    • setMainContent

      public void setMainContent(javafx.scene.layout.Region node)
      Set the main content node. Sits below the tool bar.
    • addInternalPane

      public pamViewFX.PamGuiTabFX.PamGuiInternalPane addInternalPane(javafx.scene.layout.Region pane)
      Add an internal pane to the tab.
      Parameters:
      pane - - pane to add.
      Returns:
      the internal pane which has been added
    • addInternalPane

      public pamViewFX.PamGuiTabFX.PamGuiInternalPane addInternalPane(UserDisplayNodeFX userDisplayNodeFX)
      Add an UserDisplayNodeFX to the graph.
      Parameters:
      pane - - pane to add.
      Returns:
      the internal pane which has been added
    • autoSortPanes

      public void autoSortPanes(int sortType)
      Sort panes.
    • removeInternalPane

      public void removeInternalPane(UserDisplayNodeFX removeNode)
      Remove an internal pane if it contains the node
      Parameters:
      removeNode - - remove the pane if it contains this node.
    • getInternalPanes

      public ArrayList<pamViewFX.PamGuiTabFX.PamGuiInternalPane> getInternalPanes()
      Get all internal panes within a PamGui the tab's content holder./
      Returns:
      a list of internal panes.
    • getContentHolder

      public PamBorderPane getContentHolder()
      Get the content holder which holds the toolbar pane and the main tab content pane.
      Returns:
      the content pane.
    • getContentToolbar

      public PamGuiFX.ToolBarPane getContentToolbar()
      Get the content tool bar. This sits just below the tab
      Returns:
      the content tool bar for this tab.
    • getEditable

      public boolean getEditable()
      Check whether internal panes are currently editable.
      Returns:
      true if internable panes are in editable mode.
    • isStaticDisplay

      public boolean isStaticDisplay()
    • getName

      public String getName()
      Convenience class for getting name of tabs.
      Returns:
      name of tabs.
    • getTabInfo

      public TabInfo getTabInfo()
      Tab information for the tab. Usually used for saving and restoring settings.
      Returns:
      information on the tab.