Class DialogToggleCommand

java.lang.Object
com.realtime.crossfire.jxclient.gui.commands.DialogToggleCommand
All Implemented Interfaces:
GUICommand

public class DialogToggleCommand extends Object implements GUICommand
A GUICommand which toggles the visibility of a dialog.
  • Constructor Details

    • DialogToggleCommand

      public DialogToggleCommand(@NotNull @NotNull CommandCallback commandCallback, @NotNull @NotNull String dialog)
      Creates a new instance.
      Parameters:
      commandCallback - the command callback to use
      dialog - the dialog to toggle
  • Method Details

    • getDialog

      @NotNull public @NotNull String getDialog()
      Returns the dialog to toggle.
      Returns:
      the dialog to toggle
    • canExecute

      public boolean canExecute()
      Description copied from interface: GUICommand
      Returns whether this command may be executed.
      Specified by:
      canExecute in interface GUICommand
      Returns:
      whether this command may be executed
    • execute

      public void execute()
      Description copied from interface: GUICommand
      Executes the command. Does nothing if called while GUICommand.canExecute() returns false.
      Specified by:
      execute in interface GUICommand