Skip to content

DockPane

Descriptor representing an individual dockable pane hosting arbitrary widget content, tab title, icon, dirty state, and close guards.

Overview

DockPane represents a dockable panel hosting arbitrary widget content.

Key Capabilities

  • Header Customization: Title, rich formatted text, and icons (icon()).
  • Dirty State: dirty(true) renders an unsaved indicator (e.g. bullet point or accent).
  • Close Protection: onCloseRequested(guard) prevents pane closing until confirmed or saved.
  • Classification: Configurable as DOCUMENT or TOOL.

Creating Document and Tool Panes

DockPane doc = DockPane.document("main-editor", "Main.java", editorWidget)
        .dirty(true)
        .closable(true);
  • DockPaneKind: Classification of a docking pane: DOCUMENT (primary central workspace content) or TOOL (dockable side utility tool window).
  • DockingRoot: Root visual widget for the IDE docking system hosting dock tree nodes, tab strips, split handles, drop previews, and tear-off floating window integrations.

API

DockPane(String, RichText, Widget)

Creates a dock pane with explicit identifier, RichText title, and content.

Parameter Type Description
id String Unique pane identifier.
title RichText Rich text title formatting.
content Widget Widget content displayed inside the pane.

DockPane(String, String, Widget)

Creates a dock pane with explicit identifier, string title, and widget content.

Parameter Type Description
id String Unique pane identifier.
title String Pane title text.
content Widget Widget content displayed inside the pane.

DockPane(String, Widget)

Creates a dock pane with generated unique identifier.

Parameter Type Description
title String Pane title text.
content Widget Widget content displayed inside the pane.

DockPane::autoHide()

Returns true if this pane automatically hides when focus is lost.

Returns boolean: True if auto-hide is enabled..

DockPane::autoHide(boolean)

Enables or disables auto-hide for unpinned panes.

Parameter Type Description
autoHide boolean Whether the pane auto-hides when unfocused.

Returns DockPane: This DockPane for method chaining..

DockPane::canClose()

Returns true if closable and closeGuard permits closing.

Returns boolean: True if closing was approved by the guard; false if cancelled..

DockPane::closable()

Returns true if this pane can be closed by the user.

Returns boolean: True if the pane has a close button and can be closed..

DockPane::closable(boolean)

Sets whether the pane can be closed.

Parameter Type Description
closable boolean Whether the pane can be closed.

Returns DockPane: This DockPane for method chaining..

DockPane::content()

Returns the hosted widget content.

Returns Widget: The widget hosted inside this pane..

DockPane::dirty()

Returns true if this pane has unsaved changes (shows dot indicator).

Returns boolean: True if the pane contains unsaved modifications..

DockPane::dirty(boolean)

Marks the pane as having unsaved modifications.

Parameter Type Description
dirty boolean Whether the pane has unsaved changes.

Returns DockPane: This DockPane for method chaining..

DockPane::document()

Returns true if this pane is classified as a document.

Returns boolean: True if kind is DOCUMENT..

DockPane::document(String, RichText, Widget)

Creates a document-style dock pane with RichText title.

Parameter Type Description
id String Unique pane identifier.
title RichText Rich text title formatting.
content Widget Widget content displayed inside the pane.

Returns DockPane: The constructed DockPane instance..

DockPane::document(String, String, Widget)

Creates a document-style dock pane with string title.

Parameter Type Description
id String Unique pane identifier.
title String Pane title text.
content Widget Widget content displayed inside the pane.

Returns DockPane: The constructed DockPane instance..

DockPane::icon()

Returns the icon associated with this tab.

Returns UiIcon: Icon displayed in the tab header, or null..

DockPane::icon(UiIcon)

Sets the icon displayed in tab strips and floating window headers.

Parameter Type Description
icon UiIcon Icon displayed in the tab header.

Returns DockPane: This DockPane for method chaining..

DockPane::id()

Returns the unique pane identifier.

Returns String: Unique pane identifier string..

DockPane::kind()

Returns the pane kind (DOCUMENT or TOOL).

Returns DockPaneKind: Pane kind (DOCUMENT or TOOL)..

DockPane::kind(DockPaneKind)

Sets the pane classification (DOCUMENT or TOOL).

Parameter Type Description
kind DockPaneKind Pane kind classification (DOCUMENT or TOOL).

Returns DockPane: This DockPane for method chaining..

DockPane::onCloseRequested(Predicate)

Sets a close request guard predicate that can prompt for saving or prevent closing.

Parameter Type Description
guard Predicate Predicate guard approving or rejecting pane close.

Returns DockPane: This DockPane for method chaining..

DockPane::pinned()

Returns true if this pane is pinned in the dock hierarchy.

Returns boolean: True if the pane is pinned in its tab strip..

DockPane::pinned(boolean)

Sets whether the pane is pinned.

Parameter Type Description
pinned boolean Whether the pane is pinned in the tab strip.

Returns DockPane: This DockPane for method chaining..

DockPane::richTitle()

Returns the RichText formatted title.

Returns RichText: Rich text title formatted component, or null..

DockPane::richTitle(RichText)

Sets the RichText title of the pane.

Parameter Type Description
title RichText Rich text title formatting.

Returns DockPane: This DockPane for method chaining..

DockPane::title()

Returns the plain-text title string.

Returns String: Plain text title string..

DockPane::title(String)

Sets the plain-text title of the pane.

Parameter Type Description
title String Pane title text.

Returns DockPane: This DockPane for method chaining..

DockPane::tool()

Returns true if this pane is classified as a tool window.

Returns boolean: True if kind is TOOL..

DockPane::tool(String, RichText, Widget)

Creates a tool-style dock pane with RichText title.

Parameter Type Description
id String Unique pane identifier.
title RichText Rich text title formatting.
content Widget Widget content displayed inside the pane.

Returns DockPane: The constructed DockPane instance..

DockPane::tool(String, String, Widget)

Creates a tool-style dock pane with string title.

Parameter Type Description
id String Unique pane identifier.
title String Pane title text.
content Widget Widget content displayed inside the pane.

Returns DockPane: The constructed DockPane instance..