public static class HelpAwareOptionPane.ButtonSpec extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private boolean |
enabled |
java.lang.String |
helpTopic |
javax.swing.Icon |
icon |
private java.util.Collection<javax.swing.event.ChangeListener> |
listeners |
java.lang.String |
text |
java.lang.String |
tooltipText |
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 . |
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
public 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, 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)