Class MegaMekButton

All Implemented Interfaces:
MouseListener, ImageObserver, ItemSelectable, MenuContainer, Serializable, EventListener, Accessible, SwingConstants

public class MegaMekButton extends JButton implements MouseListener
A subclass of JButton that supports specifying the look and feel of the button via a SkinSpecification.
See Also:
  • Field Details

    • backgroundIcon

      protected ImageIcon backgroundIcon
      The default background image for the button,
    • backgroundPressedIcon

      protected ImageIcon backgroundPressedIcon
      The background image to display when the button is pressed
    • bgBuffer

      protected BufferedImage bgBuffer
    • bgPressedBuffer

      protected BufferedImage bgPressedBuffer
  • Constructor Details

    • MegaMekButton

      public MegaMekButton(String text, String component, boolean defaultToPlain)
      Parameters:
      text - The button text
      component - The name of the SkinSpecification entry
    • MegaMekButton

      public MegaMekButton(String text, String component)
      Parameters:
      text - The button text
      component - The name of the SkinSpecification entry
    • MegaMekButton

      public MegaMekButton(String text)
      Default text constructor, the button will use the DefaultButton SkinSpecification.
    • MegaMekButton

      public MegaMekButton()
      Default constructor with no button text and DefaultButton SkinSpecification.
  • Method Details