com.realtime.crossfire.jxclient.commands
Class AbstractCommand

java.lang.Object
  extended by com.realtime.crossfire.jxclient.commands.AbstractCommand
All Implemented Interfaces:
Command
Direct Known Subclasses:
BindCommand, ClearCommand, DebugMessagesCommand, ExecCommand, ScreenshotCommand, ScriptCommand, ScriptkillallCommand, ScriptkillCommand, ScriptsCommand, ScripttellCommand, SetCommand, UnbindCommand

public abstract class AbstractCommand
extends java.lang.Object
implements Command

Abstract base class for Command implementations.


Field Summary
private  CrossfireServerConnection crossfireServerConnection
          The connection instance.
 
Constructor Summary
protected AbstractCommand(CrossfireServerConnection crossfireServerConnection)
          Creates a new instance.
 
Method Summary
protected  void drawInfo(java.lang.String message)
          Displays a regular output message.
protected  void drawInfo(java.lang.String message, int color)
          Displays a message.
protected  void drawInfoError(java.lang.String message)
          Displays an error message.
protected  void drawInfoSetDebugMode(boolean printMessageTypes)
          Enables or disables printing of message types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.realtime.crossfire.jxclient.commands.Command
allArguments, execute
 

Field Detail

crossfireServerConnection

@NotNull
private final CrossfireServerConnection crossfireServerConnection
The connection instance.

Constructor Detail

AbstractCommand

protected AbstractCommand(@NotNull
                          CrossfireServerConnection crossfireServerConnection)
Creates a new instance.

Parameters:
crossfireServerConnection - the connection instance
Method Detail

drawInfo

protected void drawInfo(@NotNull
                        java.lang.String message)
Displays a regular output message.

Parameters:
message - the message

drawInfo

protected void drawInfo(@NotNull
                        java.lang.String message,
                        int color)
Displays a message.

Parameters:
message - the message
color - the color code

drawInfoError

protected void drawInfoError(@NotNull
                             java.lang.String message)
Displays an error message.

Parameters:
message - the error message

drawInfoSetDebugMode

protected void drawInfoSetDebugMode(boolean printMessageTypes)
Enables or disables printing of message types.

Parameters:
printMessageTypes - whether to enable or disable message types