Class ActionPanelDemoPanel

java.lang.Object
ca.corbett.extras.demo.panels.PanelBuilder
ca.corbett.extras.demo.panels.ActionPanelDemoPanel
All Implemented Interfaces:
ExpandListener

public class ActionPanelDemoPanel extends PanelBuilder implements 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 Details

    • ActionPanelDemoPanel

      public ActionPanelDemoPanel()
  • Method Details

    • getTitle

      public String getTitle()
      Description copied from class: PanelBuilder
      Returns a name for this PanelBuilder.
      Specified by:
      getTitle in class PanelBuilder
      Returns:
      A hopefully descriptive name.
    • build

      public JPanel build()
      Description copied from class: PanelBuilder
      Builds and returns the FormPanel (or technically any JPanel) for this builder.
      Specified by:
      build in class PanelBuilder
      Returns:
      A populated JPanel (or FormPanel).
    • groupExpandedChanged

      public void groupExpandedChanged(String groupName, boolean isExpanded)
      Invoked from ActionPanel when a group is expanded or collapsed. We'll play a sound effect if available, just for fun.
      Specified by:
      groupExpandedChanged in interface ExpandListener
      Parameters:
      groupName - The name of the group that changed.
      isExpanded - True if the group is now expanded, false if collapsed.