public class CommandCheckBoxOption extends CheckBoxOption
CheckBoxOption
that executes CommandLists
when
checked/unchecked.Modifier and Type | Field and Description |
---|---|
private CommandList |
commandOff
The command list to execute when unchecked.
|
private CommandList |
commandOn
The command list to execute when checked.
|
Constructor and Description |
---|
CommandCheckBoxOption(CommandList commandOn,
CommandList commandOff,
java.lang.String tooltipText)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
protected void |
execute(boolean checked)
Executes the action associated with this check box option.
|
boolean |
isDefaultChecked()
Returns the default value of
CheckBoxOption.isChecked() . |
fireStateChangedEvent, getTooltipText, isChecked, setChecked, toggleChecked
addOptionListener, inhibitSave, removeOptionListener
@NotNull private final CommandList commandOff
@NotNull private final CommandList commandOn
public CommandCheckBoxOption(@NotNull CommandList commandOn, @NotNull CommandList commandOff, @NotNull java.lang.String tooltipText)
commandOn
- the command list to execute when checkedcommandOff
- the command list to execute when uncheckedtooltipText
- the tooltip text to explain this optionprotected void execute(boolean checked)
execute
in class CheckBoxOption
checked
- whether the check box option is checkedpublic boolean isDefaultChecked()
CheckBoxOption.isChecked()
.isDefaultChecked
in class CheckBoxOption