Class DeckPane

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.layout.Pane
javafx.scene.layout.AnchorPane
atlantafx.base.layout.DeckPane
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget

public class DeckPane extends javafx.scene.layout.AnchorPane
Represents a pane that displays all of its child nodes in a deck, where only one node can be visible at a time. It does not maintain any sequence (model), but only cares about the top node, which can be changed by various transition effects.

View Order

DeckPane manages Node.viewOrderProperty() of its children. Topmost visible node always has the highest view order value, while the rest of the nodes have the default value, which is zero. Following that logic, one must not set child nodes view order manually, because it will break the contract.

If all child nodes have the same view order value (default state after creating a new DeckPane), they are displayed in order specified by the root container, which is AnchorPane. When a node is removed from the pane, its view order is restored automatically.