java.lang.Object
org.snapfx.model.DockTabPane
- All Implemented Interfaces:
DockContainer,DockElement
Represents a tab container in the DockGraph.
Can contain multiple DockNodes as tabs.
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.IntegerPropertyReturns the selected-index property. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(DockElement element) Adds a child element.voidaddChild(DockElement element, int index) Adds a child at a specific tab index.javafx.collections.ObservableList<DockElement> Returns the list of child elements.Returns the flattened child (only after flattening a root container).getId()Returns the element's ID.Returns the parent container, ornullif this is the root.intGets the value of theselectedIndexproperty.voidremoveChild(DockElement element) Removes a child element.javafx.beans.property.IntegerPropertyReturns the selected-index property.voidsetParent(DockContainer parent) Sets the parent container.voidsetSelectedIndex(int index) Sets the value of theselectedIndexproperty.toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.snapfx.model.DockContainer
cleanupIfEmpty, isEmptyMethods inherited from interface org.snapfx.model.DockElement
removeFromParent
-
Property Details
-
selectedIndex
public javafx.beans.property.IntegerProperty selectedIndexPropertyReturns the selected-index property.- See Also:
-
-
Constructor Details
-
DockTabPane
public DockTabPane()Creates an empty tab container.
-
-
Method Details
-
getId
Description copied from interface:DockElementReturns the element's ID.- Specified by:
getIdin interfaceDockElement- Returns:
- unique layout element ID
-
getParent
Description copied from interface:DockElementReturns the parent container, ornullif this is the root.- Specified by:
getParentin interfaceDockElement- Returns:
- parent container or
null
-
setParent
Description copied from interface:DockElementSets the parent container.- Specified by:
setParentin interfaceDockElement- Parameters:
parent- parent container, ornullfor detached/root state
-
getChildren
Description copied from interface:DockContainerReturns the list of child elements.- Specified by:
getChildrenin interfaceDockContainer- Returns:
- mutable observable child list
-
addChild
Description copied from interface:DockContainerAdds a child element.- Specified by:
addChildin interfaceDockContainer- Parameters:
element- child element to add
-
addChild
Adds a child at a specific tab index.- Parameters:
element- child element to insertindex- target insertion index (clamped)
-
removeChild
Description copied from interface:DockContainerRemoves a child element.- Specified by:
removeChildin interfaceDockContainer- Parameters:
element- child element to remove
-
getFlattenedChild
Returns the flattened child (only after flattening a root container).- Returns:
- flattened child, or
nullif not available
-
getSelectedIndex
public int getSelectedIndex()Gets the value of theselectedIndexproperty.- Property description:
- Returns the selected-index property.
- Returns:
- the value of the
selectedIndexproperty - 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 theselectedIndexproperty.- Property description:
- Returns the selected-index property.
- Parameters:
index- the value for theselectedIndexproperty- See Also:
-
toString
-