Package docking.menu

Class NonToolbarMultiStateAction<T>

Type Parameters:
T - the type
All Implemented Interfaces:
DockingActionIf, HelpDescriptor

public abstract class NonToolbarMultiStateAction<T> extends MultiStateDockingAction<T>
A class for clients that wish to create a button that has multiple states, controlled by a drop-down menu. Further, this action is not meant to be added to a toolbar. If you wish for this action to appear in the toolbar, then extend MultiStateDockingAction instead.

To use this class, extend it, overriding the MultiStateDockingAction.actionStateChanged(ActionState, EventTrigger) callback. Call DockingAction.createButton() and add the return value to your UI.

See Also:
  • Constructor Details

    • NonToolbarMultiStateAction

      public NonToolbarMultiStateAction(String name, String owner)
  • Method Details

    • doCreateButton

      public JButton doCreateButton()
      Overrides:
      doCreateButton in class MultiStateDockingAction<T>
    • actionPerformed

      protected void actionPerformed()
      This method is called when the user clicks the button when this action is used as a custom button provider and not installed into the default DockingAction framework. This is the callback to be overridden when the child wishes to respond to user button presses that are on the button and not the drop-down. The default behavior is to show the popup menu when the button is clicked.