java.lang.Objectcom.realtime.crossfire.jxclient.settings.options.Option
com.realtime.crossfire.jxclient.settings.options.CheckBoxOption
public abstract class CheckBoxOption
The base class for all check box options. It manages the checked/unchecked state and notifies listeners about changes.
| Field Summary | |
|---|---|
private boolean |
checked
The current state. |
private java.lang.String |
tooltipText
The tooltip text to explain this option. |
| Constructor Summary | |
|---|---|
protected |
CheckBoxOption(java.lang.String tooltipText)
Creates a new instance. |
| Method Summary | |
|---|---|
protected abstract void |
execute(boolean checked)
Execute the action associated with this check box option. |
protected void |
fireStateChangedEvent()
Notifies all listeners that the state has changed. |
java.lang.String |
getTooltipText()
Returns the tooltip text to explain this option. |
boolean |
isChecked()
Return the current state. |
abstract boolean |
isDefaultChecked()
Return the default value of isChecked(). |
void |
setChecked(boolean checked)
Set the current state. |
void |
toggleChecked()
Toggle the checked state. |
| Methods inherited from class com.realtime.crossfire.jxclient.settings.options.Option |
|---|
addOptionListener, inhibitSave, removeOptionListener |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean checked
@NotNull private final java.lang.String tooltipText
| Constructor Detail |
|---|
protected CheckBoxOption(@NotNull
java.lang.String tooltipText)
tooltipText - the tooltip text to explain this option| Method Detail |
|---|
protected abstract void execute(boolean checked)
checked - whether the check box option is checkedprotected void fireStateChangedEvent()
fireStateChangedEvent in class Option@NotNull public java.lang.String getTooltipText()
public boolean isChecked()
public abstract boolean isDefaultChecked()
isChecked().
public void setChecked(boolean checked)
checked - The new state.public void toggleChecked()