Class ActivateCommandInputCommand

java.lang.Object
com.realtime.crossfire.jxclient.gui.textinput.ActivateCommandInputCommand
All Implemented Interfaces:
GUICommand, GUICommand2

public class ActivateCommandInputCommand extends Object implements GUICommand2
A GUICommand which activates the command input field.
  • Constructor Details

    • ActivateCommandInputCommand

      public ActivateCommandInputCommand(@NotNull @NotNull String commandText, @NotNull @NotNull CommandCallback commandCallback, @NotNull @NotNull Macros macros)
      Creates a new instance.
      Parameters:
      commandText - the command text to set
      commandCallback - the command callback to affect
      macros - the macros instance to use
  • Method Details

    • 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
    • getCommandString

      @NotNull public @NotNull String getCommandString()
      Description copied from interface: GUICommand2
      Returns the command as a string.
      Specified by:
      getCommandString in interface GUICommand2
      Returns:
      the command