Skip to content

DockNode

Hierarchical docking tree node: either a LEAF containing tabbed DockPanes or a SPLIT node dividing two children horizontally or vertically.

Overview

DockNode is an immutable-like tree node structuring the docking hierarchy.

  • LEAF Node: Holds a list of tabbed DockPanes with a selectedIndex.
  • SPLIT Node: Divides two child nodes (first, second) along HORIZONTAL or VERTICAL orientation with a fractional splitRatio.
  • DockPane: Descriptor representing an individual dockable pane hosting arbitrary widget content, tab title, icon, dirty state, and close guards.
  • DockingManager: Non-visual layout controller managing the hierarchical docking tree, pane additions, splits, tab reordering, and snapshot serialization/restoration.

API

DockNode::containsPane(String)

Checks whether this node or its descendants contain a pane with the given ID.

Parameter Type Description
paneId String Identifier of the pane to search for.

Returns boolean: True if this subtree contains a pane with the given ID..

DockNode::empty()

Returns true if this leaf contains zero panes.

Returns boolean: True if this node contains no panes..

DockNode::findPane(String)

Finds a DockPane by identifier within this node and its descendants.

Parameter Type Description
paneId String Identifier of the pane to search for.

Returns DockPane: The matching DockPane, or null if not found..

DockNode::first()

Returns the first child node of a split.

Returns DockNode: The requested child node..

DockNode::id()

Returns the unique identifier of this dock node.

Returns String: Unique node identifier..

DockNode::isLeaf()

Returns true if this node is a leaf containing panes.

Returns boolean: True if this is a leaf node holding panes..

DockNode::isSplit()

Returns true if this node is a split node containing two children.

Returns boolean: True if this is a split node holding two child nodes..

DockNode::kind()

Returns whether this node is a LEAF or SPLIT.

Returns Kind: Node classification kind (LEAF or SPLIT)..

DockNode::leaf()

Creates an empty leaf dock node.

Returns DockNode: The created DockNode instance..

DockNode::leaf(DockPane)

Creates a leaf dock node populated with an initial pane.

Parameter Type Description
pane DockPane DockPane to host in the leaf node.

Returns DockNode: The created DockNode instance..

DockNode::orientation()

Returns the split orientation (HORIZONTAL or VERTICAL) if this is a split node.

Returns DockSplitOrientation: Split orientation, or null for leaf nodes..

DockNode::panes()

Returns the unmodifiable list of panes hosted in this leaf node.

Returns List: Unmodifiable list of tabbed DockPanes in this leaf..

DockNode::second()

Returns the second child node of a split.

Returns DockNode: The requested child node..

DockNode::selectedIndex()

Returns the index of the currently active tab in this leaf.

Returns int: Zero-based index of the active selected tab..

DockNode::selectedPane()

Returns the currently selected DockPane in this leaf, or null if empty.

Returns DockPane: The active selected DockPane, or null if empty..

DockNode::split(DockSplitOrientation, DockNode, DockNode, float)

Creates a split dock node dividing two children according to orientation and ratio.

Parameter Type Description
orientation DockSplitOrientation Split orientation dividing the two children.
first DockNode First child node.
second DockNode Second child node.
splitRatio float Ratio dividing space between children (0.0 to 1.0).

Returns DockNode: The created DockNode instance..

DockNode::splitRatio()

Returns the fractional split ratio between first and second children (0.1 to 0.9).

Returns float: Split ratio dividing the two children..