DockWorkspace
classin packageklyn.gui.windows
public class DockWorkspace extends Container
└ DockWorkspace

IDE-like workspace with retractable side panes and a central tab area.

DockWorkspace is intended for professional desktop applications: project explorers, database browsers, chat panes and terminals can be collapsed to a fixed DockBar, reopened with one click and resized by dragging the separator next to the expanded pane. The workspace gives its central area and every expanded side pane a rounded, content-clipping contour by default. The area containing keyboard focus is outlined with the theme accent color. A focused side pane also outlines its associated dock-bar icon. Selected surfaces without focus use the theme's scrollbar-thumb color instead. Tabbed content outlines only the active header and document surface, never the complete tab strip. Expanded dock buttons share their pane's background.

workspace = DockWorkspace()
workspace.center.addTab("Welcome", Label("Ready"), false)
workspace.addPane(DockPane("Projects", ProjectExplorerPane(), DockSide.LEFT))
workspace.addPane(DockPane("Terminal", TerminalWidget(), DockSide.BOTTOM))
window.centralWidget = workspace
Properties
Modifier and Type Member Description
public property barSize
barSize as Int = 52
Fixed dock bar thickness in pixels.
public readonly property center
center as DockCenterArea
Central tab area.
public readonly property focusedArea
focusedArea as Widget
Visible docking area containing the window's keyboard target.
public property handleSize
handleSize as Int = 7
Separator thickness used for pane resizing.
Inherited Properties
propertyInherited Properties from Container: autoRelayout, childCount, layout, padding
propertyInherited Properties from Widget: accentColor, acceptFileDrops, backgroundColor, borderColor, bottom, canFocus, cornerRadius, cursor, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isPressed, 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: filesDropped, focusGained, focusLost, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Constructors
Modifier and Type Member Description
public DockWorkspace Creates an empty workspace with all side bars prepared.
Methods
Modifier and Type Member Description
public activatePane
activatePane(pane as DockPane) as Void
Expands pane and collapses other panes on the same side.
public addPane
addPane(pane as DockPane) as Void
Adds a side pane to the workspace.
public override applyLayout
applyLayout(recursive as Boolean = true) as Void
No summary.
public beginDragAt
beginDragAt(x as Int, y as Int) as Boolean
Starts pane resize when x, y hits a separator.
public dragTo
dragTo(x as Int, y as Int) as Boolean
Resizes the currently dragged pane.
public endDrag
endDrag() as Void
Ends the current pane resize gesture.
public findPane
findPane(title as String, side as String = "") as DockPane
Finds a pane by title and optional side.
public handleDockButtonMousePressedAt
handleDockButtonMousePressedAt(x as Int, y as Int) as Boolean
Handles only dock-button and pane-close-button mouse presses.
public hidePane
hidePane(title as String, side as String = "") as Boolean
Hides a pane without affecting other sides.
public isResizeHandleAt
isResizeHandleAt(x as Int, y as Int) as Boolean
Returns true when x, y is over a pane resize handle.
public static ownsContentOutline
ownsContentOutline(widget as Widget) as Boolean
Tests whether a view is inside a docking surface with a shared outline.
public override paint
paint(painter as Painter) as Void
No summary.
public override paintForeground
paintForeground(painter as Painter) as Void
Restores selected-surface contours above dock icons, tabs and contents.
public override paintOverlay
paintOverlay(painter as Painter) as Void
No summary.
public removePane
removePane(pane as DockPane) as Boolean
Removes a side pane and its fixed dock-bar button.
public requestRelayout
requestRelayout() as Void
Recomputes child geometry and schedules a repaint.
public resizeHandleOrientationAt
resizeHandleOrientationAt(x as Int, y as Int) as String
Returns horizontal or vertical for the resize handle under x, y.
public override setBounds
setBounds(x as Int, y as Int, width as Int, height as Int) as Void
No summary.
public showPane
showPane(title as String, side as String = "") as Boolean
Shows a pane and collapses any other expanded pane on the same side.
public togglePane
togglePane(title as String, side as String = "") as Boolean
Toggles a pane between collapsed and expanded states.
public updateDockHoverAt
updateDockHoverAt(x as Int, y as Int) as Boolean
Updates dock-button hover state from window-client coordinates.
Inherited Methods
methodInherited Methods from Container: add, applyLayout, attachWindow, blur, children, clear, remove, withLayout
methodInherited Methods from Widget: applyThemeMetrics, blur, containsPoint, emitFilesDropped, emitFocusGained, emitFocusLost, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintClipped, paintForeground, paintOverlay, preferredSizeIncludesContentZoom, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds
Inherited Operators
operatorInherited Operators from Container: operator[](index as Int) as Widget, operator[](index as UInt) as Widget