public class DialogToggleCommand extends java.lang.Object implements GUICommand
GUICommand
which toggles the visibility of a dialog.Modifier and Type | Field and Description |
---|---|
private CommandCallback |
commandCallback
The
CommandCallback to use. |
private java.lang.String |
dialog
The dialog to toggle.
|
Constructor and Description |
---|
DialogToggleCommand(CommandCallback commandCallback,
java.lang.String dialog)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExecute()
Returns whether this command may be executed.
|
void |
execute()
Executes the command.
|
@NotNull private final CommandCallback commandCallback
CommandCallback
to use.@NotNull private final java.lang.String dialog
public DialogToggleCommand(@NotNull CommandCallback commandCallback, @NotNull java.lang.String dialog)
commandCallback
- the command callback to usedialog
- the dialog to togglepublic boolean canExecute()
canExecute
in interface GUICommand
public void execute()
GUICommand.canExecute()
returns false
.execute
in interface GUICommand