com.realtime.crossfire.jxclient.gui.commands
Class ActivateCommandInputCommand

java.lang.Object
  extended by com.realtime.crossfire.jxclient.gui.commands.ActivateCommandInputCommand
All Implemented Interfaces:
GUICommand

public class ActivateCommandInputCommand
extends java.lang.Object
implements GUICommand

A GUICommand which activates the command input field.


Field Summary
private  CommandCallback commandCallback
          The CommandCallback to affect.
private  java.lang.String commandText
          The command text to set.
private  Macros macros
          The Macros instance to use.
 
Constructor Summary
ActivateCommandInputCommand(java.lang.String commandText, CommandCallback commandCallback, Macros macros)
          Creates a new instance.
 
Method Summary
 boolean canExecute()
          Returns whether this command may be executed.
 void execute()
          Executes the command.
 java.lang.String getCommandText()
          Returns the command text to set.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandCallback

@NotNull
private final CommandCallback commandCallback
The CommandCallback to affect.


commandText

@NotNull
private final java.lang.String commandText
The command text to set.


macros

@NotNull
private final Macros macros
The Macros instance to use.

Constructor Detail

ActivateCommandInputCommand

public ActivateCommandInputCommand(@NotNull
                                   java.lang.String commandText,
                                   @NotNull
                                   CommandCallback commandCallback,
                                   @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 Detail

canExecute

public boolean canExecute()
Returns whether this command may be executed.

Specified by:
canExecute in interface GUICommand
Returns:
whether this command may be executed

execute

public void execute()
Executes the command. Does nothing if called while GUICommand.canExecute() returns false.

Specified by:
execute in interface GUICommand

getCommandText

@NotNull
public java.lang.String getCommandText()
Returns the command text to set.

Returns:
the command text