Package swingtree

Class UI.SplitButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants, StylableComponent
Enclosing class:
UI

public static class UI.SplitButton extends JSplitButton
An implementation of a "split button" where the left (larger) side acts like a normal button and the right side down arrow based button opens an attached JPopupMenu. See UIFactoryMethods.splitButton(String), UIFactoryMethods.splitButton(Var) and UIFactoryMethods.splitButton(Var, Event) for usage in you UIs as well as the UIForSplitButton for more in-depth configuration (like adding options to the split button for example).

This class raises two events:

  1. SplitButtonActionListener.buttonClicked(java.awt.event.ActionEvent) when the button is clicked
  2. SplitButtonActionListener.splitButtonClicked(java.awt.event.ActionEvent) when the split part of the button is clicked
You can implement SplitButtonActionListener to handle these events, however, it is advised to register events as part of the UIForSplitButton API!
See Also:
  • Constructor Details

    • SplitButton

      public SplitButton()