Class JaxoPanelButton

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

public class JaxoPanelButton extends JButton
Special kind of button used in the JaxoButtonPanel - most such buttons can be "pressed" (modelled as the "selected" properties), indicating the current mode. The button takes care that it looks good both in selected and unselected state.
Since:
2.0
See Also:
  • Constructor Details

    • JaxoPanelButton

      public JaxoPanelButton()
      Constructor.
  • Method Details

    • getButtonHeight

      public static final int getButtonHeight()
      The default height of a panel button.
      Returns:
      the default height of a panel button.
    • updateUI

      public void updateUI()
      Overrides:
      updateUI in class JButton
    • isDefault

      public final boolean isDefault()
      Determines if this button corresponds to the default mode. Here, this may only affect the look of the button.
      Returns:
      True if this button corresponds to the default mode.
    • setDefault

      public void setDefault(boolean value)
      Sets this button as corresponding to the default mode.
      Parameters:
      value - True for default.
    • setSelected

      public void setSelected(boolean value)
      Sets a button selected.
      Overrides:
      setSelected in class AbstractButton
      Parameters:
      value - true to select.
    • setId

      public void setId(String name)
      Sets the name and the action command of this button.
      Parameters:
      name - The string to set as name and action command.