DockPane
classin packageklyn.gui.windows
public class DockPane extends Container:
└ DockPane

Retractable and resizable side panel hosted by a DockWorkspace.

A pane owns a content widget, a logical side and a preferred dock size. The workspace displays at most one expanded pane per side; collapsed panes remain reachable through their side DockBar button.

workspace = DockWorkspace()
pane = DockPane("Projects", ProjectExplorerPane(), DockSide.LEFT, "assets/icons/ui/project-explorer.svg")
pane.dockSize = 320
workspace.addPane(pane)
Properties
Modifier and Type Member Description
public readonly property content
content as Widget:
Content widget hosted by this pane.
public property dockSize
dockSize as Int = 300
Current preferred size in the docking direction.
public property headerHeight
headerHeight as Int = 34
Header height in pixels.
public property icon
icon as String
Optional SVG icon path or symbolic icon name.
public property isCollapsed
isCollapsed as Boolean = false
Collapsed panes are hidden but keep their button in the DockBar.
public property minimumDockSize
minimumDockSize as Int = 180
Minimal pane size while resizing.
public property side
side as String
Dock side, one of DockSide.LEFT, RIGHT, BOTTOM or TOP.
public property title
title as String
Visible title shown in the pane header and dock bar.
Inherited Properties
propertyInherited Properties from Container: autoRelayout, layout, padding, size
propertyInherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, right, sizePolicy, styleClass, width, window, x, y
Inherited Events
eventInherited Events from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors
Modifier and Type Member Description
public DockPane
DockPane(title as String = "", content as Widget = null, side as String = DockSide.LEFT, icon as String = ""):
Creates a dock pane around a content widget.
Methods
Modifier and Type Member Description
public override applyLayout
applyLayout(recursive as Boolean = true) as Void:
No summary.
public attachWorkspace
attachWorkspace(workspace as DockWorkspace) as Void:
Called by DockWorkspace when the pane is inserted.
public collapse
collapse() as Void:
Collapses this pane.
public collapseButtonContains
collapseButtonContains(x as Int, y as Int) as Boolean:
Returns true when x, y hits the pane collapse button.
public expand
expand() as Void:
Expands this pane and collapses other panes on the same side.
public handleMousePressedAt
handleMousePressedAt(x as Int, y as Int) as Boolean:
Handles a mouse press in pane coordinates.
public override paint
paint(painter as Painter) as Void:
No summary.
public override paintOverlay
paintOverlay(painter as Painter) as Void:
No summary.
public override setBounds
setBounds(x as Int, y as Int, width as Int, height as Int) as Void:
No summary.
public setContent
setContent(content as Widget) as Void:
Replaces the hosted content widget while keeping the pane and dock button.
public toggle
toggle() as Void:
Toggles the collapsed state.
Inherited Methods
methodInherited Methods from Container: add, applyLayout, attachWindow, children, clear, remove, withLayout
methodInherited Methods from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds
Inherited Operators
operatorInherited Operators from Container: operator[](index as Int) as Widget:, operator[](index as UInt) as Widget: