Class SideButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants, Destroyable

public class SideButton extends JButton implements Destroyable
Button that is usually used in toggle dialogs.
Since:
744
See Also:
  • Field Details

  • Constructor Details

    • SideButton

      public SideButton(Action action)
      Constructs a new SideButton.
      Parameters:
      action - action used to specify the new button an icon must be provided with ImageResource.attachImageIcon(AbstractAction, boolean)
      Throws:
      IllegalArgumentException - if no icon provided
      Since:
      744
    • SideButton

      public SideButton(Action action, boolean usename)
      Constructs a new SideButton.
      Parameters:
      action - action used to specify the new button
      usename - use action name
      Since:
      2710
    • SideButton

      public SideButton(Action action, String imagename)
      Constructs a new SideButton.
      Parameters:
      action - action used to specify the new button
      imagename - image name in "dialogs" directory
      Since:
      2747
  • Method Details

    • doStyle

      private void doStyle()
      Do the style settings for the side button layout
    • createArrow

      Create the arrow for opening a drop-down menu
      Parameters:
      listener - listener to use for button actions (e.g. pressing)
      Returns:
      the created button
      Since:
      9668
    • createArrow

      public BasicArrowButton createArrow(ActionListener listener, boolean enabledWithButton)
      Create the arrow for opening a drop-down menu
      Parameters:
      listener - listener to use for button actions (e.g. pressing)
      enabledWithButton - determines if the button arrow enabled state is the same as main button
      Returns:
      the created button
      Since:
      13545
    • setEnabled

      public void setEnabled(boolean b)
      Overrides:
      setEnabled in class AbstractButton
    • destroy

      public void destroy()
      Description copied from interface: Destroyable
      Called when the object has been destroyed.
      Specified by:
      destroy in interface Destroyable