com.realtime.crossfire.jxclient.commands
Class BindCommand

java.lang.Object
  extended by com.realtime.crossfire.jxclient.commands.AbstractCommand
      extended by com.realtime.crossfire.jxclient.commands.BindCommand
All Implemented Interfaces:
Command

public class BindCommand
extends AbstractCommand

Implements the "bind" command. It associates a key with a command.


Field Summary
private  CommandCallback commandCallback
          The CommandCallback to use.
private  Commands commands
          The commands instance for executing commands.
private  Macros macros
          The Macros instance to use.
 
Constructor Summary
BindCommand(CrossfireServerConnection crossfireServerConnection, Commands commands, CommandCallback commandCallback, Macros macros)
          Creates a new instance.
 
Method Summary
 boolean allArguments()
          Returns whether all remaining commands should be included as arguments.
 void execute(java.lang.String args)
          Executes the command with the given arguments.
 
Methods inherited from class com.realtime.crossfire.jxclient.commands.AbstractCommand
drawInfo, drawInfo, drawInfoError, drawInfoSetDebugMode
 
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 use.


commands

@NotNull
private final Commands commands
The commands instance for executing commands.


macros

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

Constructor Detail

BindCommand

public BindCommand(@NotNull
                   CrossfireServerConnection crossfireServerConnection,
                   @NotNull
                   Commands commands,
                   @NotNull
                   CommandCallback commandCallback,
                   @NotNull
                   Macros macros)
Creates a new instance.

Parameters:
crossfireServerConnection - the connection instance
commands - the commands instance for executing commands
commandCallback - the command callback to use
macros - the macros instance to use
Method Detail

allArguments

public boolean allArguments()
Returns whether all remaining commands should be included as arguments.

Returns:
whether all remaining commands should be included as arguments

execute

public void execute(@NotNull
                    java.lang.String args)
Executes the command with the given arguments.

Parameters:
args - the command arguments