Class EmptyBorderButton

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants
Direct Known Subclasses:
EmptyBorderToggleButton, MultipleActionDockingToolbarButton

public class EmptyBorderButton extends JButton
Class that is a JButton that has an empty border and adds a mouse listener so that the button looks raised when the mouse pointer enters the button, and looks lowered when the mouse pointer exits the button.e
See Also:
  • Field Details

    • RAISED_BUTTON_BORDER

      public static final Border RAISED_BUTTON_BORDER
      A raised beveled border.
    • NO_BUTTON_BORDER

      public static final Border NO_BUTTON_BORDER
      An empty border.
    • LOWERED_BUTTON_BORDER

      public static final Border LOWERED_BUTTON_BORDER
      A lowered border beveled border.
    • FOCUSED_BUTTON_BORDER

      public static final Border FOCUSED_BUTTON_BORDER
  • Constructor Details

    • EmptyBorderButton

      public EmptyBorderButton()
      Construct a new EmptyBorderButton.
    • EmptyBorderButton

      public EmptyBorderButton(String text)
      Construct a new EmptyBorderButton that has the given button text.
      Parameters:
      text - text of the button
    • EmptyBorderButton

      public EmptyBorderButton(Action a)
      Construct a new EmptyBorderButton that has an associated action.
      Parameters:
      a - action for the button
    • EmptyBorderButton

      public EmptyBorderButton(Icon icon)
      Construct a new EmptyBorderButton that has an icon.
      Parameters:
      icon - icon for the button
    • EmptyBorderButton

      public EmptyBorderButton(String text, Icon icon)
      Construct a new EmptyBorderButton that has text and an icon.
      Parameters:
      text - button text
      icon - icon for the button
  • Method Details

    • setIcon

      public void setIcon(Icon newIcon)
      Overrides:
      setIcon in class AbstractButton
    • raiseBorder

      public void raiseBorder()
    • clearBorder

      public void clearBorder()
    • updateBorderBasedOnState

      protected void updateBorderBasedOnState()
    • getFocusedBorder

      protected Border getFocusedBorder()
    • getRaisedBorder

      protected Border getRaisedBorder()
    • getLoweredBorder

      protected Border getLoweredBorder()
    • removeListeners

      public void removeListeners()