Class HelpAwareOptionPane.ButtonSpec

java.lang.Object
org.openstreetmap.josm.gui.HelpAwareOptionPane.ButtonSpec
Enclosing class:
HelpAwareOptionPane

public static class HelpAwareOptionPane.ButtonSpec extends Object
A specification of a button that should be added to the options dialog
  • Field Details

  • Constructor Details

    • ButtonSpec

      public ButtonSpec(String text, ImageProvider imageProvider, String tooltipText, String helpTopic)
      Constructs a new ButtonSpec.
      Parameters:
      text - the button text
      imageProvider - provides the icon to display. Can be null
      tooltipText - the tooltip text. Can be null.
      helpTopic - the help topic. Can be null.
      Since:
      13842
    • ButtonSpec

      public ButtonSpec(String text, Icon icon, String tooltipText, String helpTopic)
      Constructs a new ButtonSpec.
      Parameters:
      text - the button text
      icon - the icon to display. Can be null
      tooltipText - the tooltip text. Can be null.
      helpTopic - the help topic. Can be null.
    • ButtonSpec

      public ButtonSpec(String text, Icon icon, String tooltipText, String helpTopic, boolean enabled)
      Constructs a new ButtonSpec.
      Parameters:
      text - the button text
      icon - the icon to display. Can be null
      tooltipText - the tooltip text. Can be null.
      helpTopic - the help topic. Can be null.
      enabled - the enabled status
      Since:
      5951
  • Method Details

    • isEnabled

      public final boolean isEnabled()
      Determines if this button spec is enabled
      Returns:
      true if this button spec is enabled, false otherwise
      Since:
      6051
    • setEnabled

      public final void setEnabled(boolean enabled)
      Enables or disables this button spec, depending on the value of the parameter b.
      Parameters:
      enabled - if true, this button spec is enabled; otherwise this button spec is disabled
      Since:
      6051
    • addChangeListener

      private boolean addChangeListener(ChangeListener listener)