Dock
Docks are panels at the edges of a stage, which can be contracted to save screen real-estate, then shown again with a press of a button.
A Dock is part of a Harbour. Each Dock can be placed on any of the four sides, and each side has a Primary
and Secondary
group of docks. Only 1 dock within each group can be visible at any time. Expanding a dock will contract the previously visible dock (if there is one).
You can hide/show a dock programmatically using the visible property. Docks can be hidden/shown via a toggle button, which is part of the HarbourSide, not part of the Dock itself.
When a dock is hidden, it is removed from the scene-graph (i.e. Dock.scene == null and Dock.parent == null).
Theme DSL
"dock" {
child( ".container" ) { // A BorderPane
child( ".title_bar" ) {
child( ".container" ) {
child( ".hide" ) { // The 'Hide' Button (the default theme sets the graphic to a horizontal bar)
}
}
}
}
}
Inheritors
Properties
Which sides of the harbour this Dock can be moved to by the user.
Set this to false
to prevent the user closing this Dock. Closing the Dock programmatically is not affected by this.
The main content of the Dock.
Each side of the Harbour has two sets of Docks, primary
or secondary
. This decides if this Dock is placed in the primary
set if not explicitly specified. See Harbour.add
Determines which side of the Harbour this Dock will be placed if not explicitly specified. See Harbour.add.
Buttons (or other Nodes), which appear in the title-bar of this Dock. Initially, this contains only a close
button. If you want the close button to remain on the far right, then add items at the front of the list.
Appears in to ToggleButton at the side of the Harbour, as well as in the title-bar of the dock.