Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.commands.AbstractCommand Class Referenceabstract

Abstract base class for Command implementations. More...

+ Inheritance diagram for com.realtime.crossfire.jxclient.commands.AbstractCommand:
+ Collaboration diagram for com.realtime.crossfire.jxclient.commands.AbstractCommand:

Public Member Functions

String getCommandName ()
 Returns the name of the command.
Returns
the name
More...
 
String toString ()
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.commands.Command
boolean allArguments ()
 Returns whether all remaining commands should be included as arguments. More...
 
void execute (@NotNull String args)
 Executes the command with the given arguments. More...
 

Protected Member Functions

 AbstractCommand (@NotNull final String commandName, @NotNull final CrossfireServerConnection crossfireServerConnection)
 Creates a new instance. More...
 
void drawInfo (@NotNull final String message)
 Displays a regular output message. More...
 
void drawInfo (@NotNull final String message, final int color)
 Displays a message. More...
 
void drawInfoError (@NotNull final String message)
 Displays an error message. More...
 

Private Attributes

final String commandName
 The name of the command. More...
 
final CrossfireServerConnection crossfireServerConnection
 The connection instance. More...
 

Detailed Description

Abstract base class for Command implementations.

Author
Andreas Kirschbaum

Definition at line 32 of file AbstractCommand.java.

Constructor & Destructor Documentation

◆ AbstractCommand()

com.realtime.crossfire.jxclient.commands.AbstractCommand.AbstractCommand ( @NotNull final String  commandName,
@NotNull final CrossfireServerConnection  crossfireServerConnection 
)
protected

Creates a new instance.

Parameters
commandNamethe name of the command
crossfireServerConnectionthe connection instance

Definition at line 51 of file AbstractCommand.java.

References com.realtime.crossfire.jxclient.commands.AbstractCommand.commandName, and com.realtime.crossfire.jxclient.commands.AbstractCommand.crossfireServerConnection.

Member Function Documentation

◆ drawInfo() [1/2]

◆ drawInfo() [2/2]

void com.realtime.crossfire.jxclient.commands.AbstractCommand.drawInfo ( @NotNull final String  message,
final int  color 
)
protected

Displays a message.

Parameters
messagethe message
colorthe color code

Definition at line 77 of file AbstractCommand.java.

References com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.drawInfo().

+ Here is the call graph for this function:

◆ drawInfoError()

◆ getCommandName()

String com.realtime.crossfire.jxclient.commands.AbstractCommand.getCommandName ( )

Returns the name of the command.

Returns
the name

Implements com.realtime.crossfire.jxclient.commands.Command.

Definition at line 86 of file AbstractCommand.java.

References com.realtime.crossfire.jxclient.commands.AbstractCommand.commandName.

◆ toString()

String com.realtime.crossfire.jxclient.commands.AbstractCommand.toString ( )

Member Data Documentation

◆ commandName

final String com.realtime.crossfire.jxclient.commands.AbstractCommand.commandName
private

◆ crossfireServerConnection

final CrossfireServerConnection com.realtime.crossfire.jxclient.commands.AbstractCommand.crossfireServerConnection
private

The connection instance.

Definition at line 44 of file AbstractCommand.java.

Referenced by com.realtime.crossfire.jxclient.commands.AbstractCommand.AbstractCommand().


The documentation for this class was generated from the following file: