Crossfire JXClient, Trunk
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
com.realtime.crossfire.jxclient.commands.AbstractCommand Class Referenceabstract
Inheritance diagram for com.realtime.crossfire.jxclient.commands.AbstractCommand:
Inheritance graph
Collaboration diagram for com.realtime.crossfire.jxclient.commands.AbstractCommand:
Collaboration graph

Public Member Functions

String getCommandName ()
 
String toString ()
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.commands.Command
boolean allArguments ()
 
void execute (@NotNull String args)
 
String getHelp ()
 

Protected Member Functions

 AbstractCommand (@NotNull final String commandName, @NotNull final CrossfireServerConnection crossfireServerConnection)
 
void drawInfo (@NotNull final String message)
 
void drawInfo (@NotNull final String message, final int color)
 
void drawInfoError (@NotNull final String message)
 

Private Attributes

final String commandName
 
final CrossfireServerConnection crossfireServerConnection
 

Detailed Description

Abstract base class for Command implementations.

Author
Andreas Kirschbaum

Definition at line 33 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 52 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]

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

◆ 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 78 of file AbstractCommand.java.

References com.realtime.crossfire.jxclient.commands.AbstractCommand.crossfireServerConnection, and com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.drawInfo().

Here is the call graph for this function:

◆ drawInfoError()

void com.realtime.crossfire.jxclient.commands.AbstractCommand.drawInfoError ( @NotNull final String  message)
protected

◆ 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 84 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 documentation for this class was generated from the following file: