public static class HelpAwareOptionPane.ButtonSpec extends Object
Modifier and Type | Field and Description |
---|---|
private boolean |
enabled |
String |
helpTopic |
Icon |
icon |
private Collection<ChangeListener> |
listeners |
String |
text |
String |
tooltipText |
Constructor and Description |
---|
ButtonSpec(String text,
Icon icon,
String tooltipText,
String helpTopic)
Constructs a new
ButtonSpec . |
ButtonSpec(String text,
Icon icon,
String tooltipText,
String helpTopic,
boolean enabled)
Constructs a new
ButtonSpec . |
Modifier and Type | Method and Description |
---|---|
private boolean |
addChangeListener(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 String tooltipText
private boolean enabled
private final Collection<ChangeListener> listeners
public ButtonSpec(String text, Icon icon, String tooltipText, 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(String text, Icon icon, String tooltipText, 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(ChangeListener listener)