Class DialogToggleCommand
java.lang.Object
com.realtime.crossfire.jxclient.gui.commands.DialogToggleCommand
- All Implemented Interfaces:
GUICommand
A
GUICommand which toggles the visibility of a dialog.-
Constructor Summary
ConstructorsConstructorDescriptionDialogToggleCommand(@NotNull CommandCallback commandCallback, @NotNull String dialog) Creates a new instance. -
Method Summary
-
Constructor Details
-
DialogToggleCommand
public DialogToggleCommand(@NotNull @NotNull CommandCallback commandCallback, @NotNull @NotNull String dialog) Creates a new instance.- Parameters:
commandCallback- the command callback to usedialog- the dialog to toggle
-
-
Method Details
-
getDialog
Returns the dialog to toggle.- Returns:
- the dialog to toggle
-
canExecute
public boolean canExecute()Description copied from interface:GUICommandReturns whether this command may be executed.- Specified by:
canExecutein interfaceGUICommand- Returns:
- whether this command may be executed
-
execute
public void execute()Description copied from interface:GUICommandExecutes the command. Does nothing if called whileGUICommand.canExecute()returnsfalse.- Specified by:
executein interfaceGUICommand
-