Module org.snapfx

Class DockTabPane

java.lang.Object
org.snapfx.model.DockTabPane
All Implemented Interfaces:
DockContainer, DockElement

public class DockTabPane extends Object implements DockContainer
Represents a tab container in the DockGraph. Can contain multiple DockNodes as tabs.
  • Property Details

  • Constructor Details

    • DockTabPane

      public DockTabPane()
      Creates an empty tab container.
  • Method Details

    • getId

      public String getId()
      Description copied from interface: DockElement
      Returns the element's ID.
      Specified by:
      getId in interface DockElement
      Returns:
      unique layout element ID
    • getParent

      public DockContainer getParent()
      Description copied from interface: DockElement
      Returns the parent container, or null if this is the root.
      Specified by:
      getParent in interface DockElement
      Returns:
      parent container or null
    • setParent

      public void setParent(DockContainer parent)
      Description copied from interface: DockElement
      Sets the parent container.
      Specified by:
      setParent in interface DockElement
      Parameters:
      parent - parent container, or null for detached/root state
    • getChildren

      public javafx.collections.ObservableList<DockElement> getChildren()
      Description copied from interface: DockContainer
      Returns the list of child elements.
      Specified by:
      getChildren in interface DockContainer
      Returns:
      mutable observable child list
    • addChild

      public void addChild(DockElement element)
      Description copied from interface: DockContainer
      Adds a child element.
      Specified by:
      addChild in interface DockContainer
      Parameters:
      element - child element to add
    • addChild

      public void addChild(DockElement element, int index)
      Adds a child at a specific tab index.
      Parameters:
      element - child element to insert
      index - target insertion index (clamped)
    • removeChild

      public void removeChild(DockElement element)
      Description copied from interface: DockContainer
      Removes a child element.
      Specified by:
      removeChild in interface DockContainer
      Parameters:
      element - child element to remove
    • getFlattenedChild

      public DockElement getFlattenedChild()
      Returns the flattened child (only after flattening a root container).
      Returns:
      flattened child, or null if not available
    • getSelectedIndex

      public int getSelectedIndex()
      Gets the value of the selectedIndex property.
      Property description:
      Returns the selected-index property.
      Returns:
      the value of the selectedIndex property
      See Also:
    • selectedIndexProperty

      public javafx.beans.property.IntegerProperty selectedIndexProperty()
      Returns the selected-index property.
      Returns:
      selected-index property
      See Also:
    • setSelectedIndex

      public void setSelectedIndex(int index)
      Sets the value of the selectedIndex property.
      Property description:
      Returns the selected-index property.
      Parameters:
      index - the value for the selectedIndex property
      See Also:
    • toString

      public String toString()
      Overrides:
      toString in class Object