public static class HelpAwareOptionPane.ButtonSpec extends java.lang.Object
| Modifier and Type | Field and 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 and 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. |
| Modifier and Type | Method and 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. |
public final java.lang.String text
public final javax.swing.Icon icon
nullpublic final java.lang.String tooltipText
public final java.lang.String helpTopic
private boolean enabled
private final java.util.Collection<javax.swing.event.ChangeListener> listeners
public ButtonSpec(java.lang.String text, ImageProvider imageProvider, java.lang.String tooltipText, java.lang.String helpTopic)
ButtonSpec.text - the button textimageProvider - provides the icon to display. Can be nulltooltipText - the tooltip text. Can be null.helpTopic - the help topic. Can be null.public ButtonSpec(java.lang.String text, javax.swing.Icon icon, java.lang.String tooltipText, java.lang.String helpTopic)
ButtonSpec.text - the button texticon - the icon to display. Can be nulltooltipText - the tooltip text. Can be null.helpTopic - the help topic. Can be null.public ButtonSpec(java.lang.String text, javax.swing.Icon icon, java.lang.String tooltipText, java.lang.String helpTopic, boolean enabled)
ButtonSpec.text - the button texticon - the icon to display. Can be nulltooltipText - the tooltip text. Can be null.helpTopic - the help topic. Can be null.enabled - the enabled statuspublic final boolean isEnabled()
true if this button spec is enabled, false otherwisepublic final void setEnabled(boolean enabled)
b.enabled - if true, this button spec is enabled; otherwise this button spec is disabledprivate boolean addChangeListener(javax.swing.event.ChangeListener listener)