Package ca.corbett.extras.demo.panels
Class ActionPanelDemoPanel
java.lang.Object
ca.corbett.extras.demo.panels.PanelBuilder
ca.corbett.extras.demo.panels.ActionPanelDemoPanel
- All Implemented Interfaces:
ExpandListener
To show off the new ActionPanel component.
New in swing-extras 2.8, the ActionPanel is a great way to group related
actions together into collapsible sections. This is great for presenting otherwise
long and complex navigation menus in a compact way.
There are many styling options! This demo panel shows off some of the things
you can do with ActionPanel.
- Since:
- swing-extras 2.8
- Author:
- scorbo2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds and returns the FormPanel (or technically any JPanel) for this builder.getTitle()Returns a name for this PanelBuilder.voidgroupExpandedChanged(String groupName, boolean isExpanded) Invoked from ActionPanel when a group is expanded or collapsed.Methods inherited from class ca.corbett.extras.demo.panels.PanelBuilder
buildFormPanel, buildFormPanel, buildHighlightedHeaderLabel, createSnippetLabel, createSnippetLabel
-
Constructor Details
-
ActionPanelDemoPanel
public ActionPanelDemoPanel()
-
-
Method Details
-
getTitle
Description copied from class:PanelBuilderReturns a name for this PanelBuilder.- Specified by:
getTitlein classPanelBuilder- Returns:
- A hopefully descriptive name.
-
build
Description copied from class:PanelBuilderBuilds and returns the FormPanel (or technically any JPanel) for this builder.- Specified by:
buildin classPanelBuilder- Returns:
- A populated JPanel (or FormPanel).
-
groupExpandedChanged
Invoked from ActionPanel when a group is expanded or collapsed. We'll play a sound effect if available, just for fun.- Specified by:
groupExpandedChangedin interfaceExpandListener- Parameters:
groupName- The name of the group that changed.isExpanded- True if the group is now expanded, false if collapsed.
-