Class HelpAwareOptionPane.ButtonSpec

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean enabled  
      java.lang.String helpTopic
      The help topic to link
      javax.swing.Icon icon
      the icon to display.
      private java.util.Collection<javax.swing.event.ChangeListener> listeners  
      java.lang.String text
      the button text
      java.lang.String tooltipText
      The tooltip to display when hovering the button
    • Constructor Summary

      Constructors 
      Constructor Description
      ButtonSpec​(java.lang.String text, javax.swing.Icon icon, java.lang.String tooltipText, java.lang.String helpTopic)
      Constructs a new ButtonSpec.
      ButtonSpec​(java.lang.String text, javax.swing.Icon icon, java.lang.String tooltipText, java.lang.String helpTopic, boolean enabled)
      Constructs a new ButtonSpec.
      ButtonSpec​(java.lang.String text, ImageProvider imageProvider, java.lang.String tooltipText, java.lang.String helpTopic)
      Constructs a new ButtonSpec.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      private boolean addChangeListener​(javax.swing.event.ChangeListener listener)  
      boolean isEnabled()
      Determines if this button spec is enabled
      void setEnabled​(boolean enabled)
      Enables or disables this button spec, depending on the value of the parameter b.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • text

        public final java.lang.String text
        the button text
      • icon

        public final javax.swing.Icon icon
        the icon to display. Can be null
      • tooltipText

        public final java.lang.String tooltipText
        The tooltip to display when hovering the button
      • helpTopic

        public final java.lang.String helpTopic
        The help topic to link
      • listeners

        private final java.util.Collection<javax.swing.event.ChangeListener> listeners
    • Constructor Detail

      • ButtonSpec

        public ButtonSpec​(java.lang.String text,
                          ImageProvider imageProvider,
                          java.lang.String tooltipText,
                          java.lang.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​(java.lang.String text,
                          javax.swing.Icon icon,
                          java.lang.String tooltipText,
                          java.lang.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​(java.lang.String text,
                          javax.swing.Icon icon,
                          java.lang.String tooltipText,
                          java.lang.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 Detail

      • 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​(javax.swing.event.ChangeListener listener)