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. The pane itself is headerless: the hosted content owns its title area, while the close affordance is painted as a lightweight overlay when the pointer is inside the pane. Its rounded contour clips the hosted content by default; cornerRadius or the DockPane KSS selector can customize that contour.

workspace = DockWorkspace()
pane = DockPane("Projects", ProjectExplorerPane(), DockSide.LEFT, "assets/icons/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 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
Logical title shown in the dock bar and used by workspace lookups.
Inherited Properties
propertyInherited Properties from Container: autoRelayout, childCount, layout, padding
propertyInherited Properties from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, resolvedStyleCache, resolvedStyleCacheAppearanceMode, resolvedStyleCacheFont, resolvedStyleCacheRevision, resolvedStyleCacheStateKey, resolvedStyleCacheStyleClass, resolvedStyleCacheZoomRevision, right, size, sizePolicy, styleClass, toolTip, 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.
public updateHoverAt
updateHoverAt(x as Int, y as Int) as Boolean:
Updates the pane hover state from window-client coordinates.
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, paintClipped, 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: