Class CommandCheckBoxOption
- java.lang.Object
-
- com.realtime.crossfire.jxclient.settings.options.Option
-
- com.realtime.crossfire.jxclient.settings.options.CheckBoxOption
-
- com.realtime.crossfire.jxclient.gui.commands.CommandCheckBoxOption
-
public class CommandCheckBoxOption extends CheckBoxOption
ACheckBoxOptionthat executesCommandListswhen checked/unchecked.
-
-
Constructor Summary
Constructors Constructor Description CommandCheckBoxOption(@NotNull CommandList commandOn, @NotNull CommandList commandOff, @NotNull java.lang.String tooltipText)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidexecute(boolean checked)Executes the action associated with this check box option.booleanisDefaultChecked()Returns the default value ofCheckBoxOption.isChecked().-
Methods inherited from class com.realtime.crossfire.jxclient.settings.options.CheckBoxOption
fireStateChangedEvent, getTooltipText, isChecked, setChecked, toggleChecked
-
Methods inherited from class com.realtime.crossfire.jxclient.settings.options.Option
addOptionListener, inhibitSave, removeOptionListener
-
-
-
-
Constructor Detail
-
CommandCheckBoxOption
public CommandCheckBoxOption(@NotNull @NotNull CommandList commandOn, @NotNull @NotNull CommandList commandOff, @NotNull @NotNull java.lang.String tooltipText)Creates a new instance.- Parameters:
commandOn- the command list to execute when checkedcommandOff- the command list to execute when uncheckedtooltipText- the tooltip text to explain this option
-
-
Method Detail
-
execute
protected void execute(boolean checked)
Description copied from class:CheckBoxOptionExecutes the action associated with this check box option. Must be implemented in sub-classes.- Specified by:
executein classCheckBoxOption- Parameters:
checked- whether the check box option is checked
-
isDefaultChecked
public boolean isDefaultChecked()
Description copied from class:CheckBoxOptionReturns the default value ofCheckBoxOption.isChecked().- Specified by:
isDefaultCheckedin classCheckBoxOption- Returns:
- the default value
-
-