ExpandablePanel
Collapsible panel container with header bar, toggle chevron, and smooth expansion/collapse height animation.
Overview
Collapsible panel container with header bar, toggle chevron, and smooth expansion/collapse height animation. Provides extensive layout configuration and interaction capabilities.
Basic Usage
Related links
- Accordion: Vertical accordion container managing a stack of collapsible ExpandablePanel sections with optional single-panel open constraint.
API
ExpandablePanel()
Constructs an empty ExpandablePanel.
ExpandablePanel(RichText)
Constructs an ExpandablePanel with a RichText formatted title.
| Parameter | Type | Description |
|---|---|---|
title |
RichText |
The title text. |
ExpandablePanel(String)
Constructs an ExpandablePanel with a plain text title.
| Parameter | Type | Description |
|---|---|---|
title |
String |
The title text. |
ExpandablePanel::addContent(Widget)
Adds a content widget into the expandable body.
| Parameter | Type | Description |
|---|---|---|
child |
Widget |
The child node instance. |
Returns ExpandablePanel: This instance for chaining..
ExpandablePanel::clearContent()
Clears all content widgets from the expandable body.
Returns ExpandablePanel: This instance for chaining..
ExpandablePanel::contentHost()
Returns the vertical container hosting expandable content widgets.
Returns VBox: The container hosting content views..
ExpandablePanel::expanded()
Returns true if the panel content is currently expanded.
Returns boolean: True if expanded; false otherwise..
ExpandablePanel::expanded(boolean)
Sets the expanded state and dispatches an expansion event.
| Parameter | Type | Description |
|---|---|---|
expanded |
boolean |
Whether the node or panel is expanded. |
Returns ExpandablePanel: This instance for chaining..
ExpandablePanel::headerButton()
Returns the header ToggleButton controlling panel expansion.
Returns ToggleButton: The header toggle button..
ExpandablePanel::onExpandedChanged(EventListener)
Registers a listener invoked when the panel expands or collapses.
| Parameter | Type | Description |
|---|---|---|
listener |
EventListener |
The event listener callback. |
Returns EventSubscription: The event subscription handle..
ExpandablePanel::removeContent(Widget)
Removes a content widget from the expandable body.
| Parameter | Type | Description |
|---|---|---|
child |
Widget |
The child node instance. |
Returns ExpandablePanel: This instance for chaining..
ExpandablePanel::richTitle()
Returns the RichText formatted title.
Returns RichText: The rich text title..
ExpandablePanel::richTitle(RichText)
Sets the RichText formatted title.
| Parameter | Type | Description |
|---|---|---|
title |
RichText |
The title text. |
Returns ExpandablePanel: This instance for chaining..
ExpandablePanel::silentExpanded(boolean)
Sets the expanded state without triggering event callbacks.
| Parameter | Type | Description |
|---|---|---|
expanded |
boolean |
Whether the node or panel is expanded. |
Returns ExpandablePanel: This instance for chaining..
ExpandablePanel::title()
Returns the plain text title string.
Returns String: The plain text title..
ExpandablePanel::title(String)
Sets the plain text title.
| Parameter | Type | Description |
|---|---|---|
title |
String |
The title text. |
Returns ExpandablePanel: This instance for chaining..
ExpandablePanel::toggleExpanded()
Toggles between expanded and collapsed states.
Returns ExpandablePanel: This instance for chaining..