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

Public Member Functions

boolean allArguments ()
 
void execute (@NotNull final String args)
 
String getHelp ()
 
 ShortcutCommand (@NotNull final Shortcuts shortcuts, @NotNull final CrossfireServerConnection crossfireServerConnection)
 
- Public Member Functions inherited from com.realtime.crossfire.jxclient.commands.AbstractCommand
String getCommandName ()
 
String toString ()
 

Private Member Functions

void deleteSlot (@NotNull final String args)
 
void listSlots ()
 
ShortcutSlot parseKey (@NotNull final String args)
 
void updateSlot (@NotNull final String args)
 

Private Attributes

final Shortcuts shortcuts
 

Additional Inherited Members

- Protected Member Functions inherited from com.realtime.crossfire.jxclient.commands.AbstractCommand
 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)
 

Detailed Description

Implements the "shortcut" command. It adds, modifies or removes the contents of the shortcut bar.

Author
Andreas Kirschbaum

Definition at line 38 of file ShortcutCommand.java.

Constructor & Destructor Documentation

◆ ShortcutCommand()

com.realtime.crossfire.jxclient.commands.ShortcutCommand.ShortcutCommand ( @NotNull final Shortcuts  shortcuts,
@NotNull final CrossfireServerConnection  crossfireServerConnection 
)

Creates a new instance.

Parameters
shortcutsthe shortcuts to use
crossfireServerConnectionthe connection instance screenshot file names

Definition at line 52 of file ShortcutCommand.java.

References com.realtime.crossfire.jxclient.commands.AbstractCommand.crossfireServerConnection, and com.realtime.crossfire.jxclient.commands.ShortcutCommand.shortcuts.

Member Function Documentation

◆ allArguments()

boolean com.realtime.crossfire.jxclient.commands.ShortcutCommand.allArguments ( )

Returns whether all remaining commands should be included as arguments.

Returns
whether all remaining commands should be included as arguments

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

Definition at line 58 of file ShortcutCommand.java.

◆ deleteSlot()

void com.realtime.crossfire.jxclient.commands.ShortcutCommand.deleteSlot ( @NotNull final String  args)
private

Clears a slot.

Parameters
argsthe key name

Definition at line 88 of file ShortcutCommand.java.

References com.realtime.crossfire.jxclient.commands.ShortcutCommand.parseKey(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setShortcutString(), and com.realtime.crossfire.jxclient.commands.ShortcutCommand.shortcuts.

Referenced by com.realtime.crossfire.jxclient.commands.ShortcutCommand.execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute()

void com.realtime.crossfire.jxclient.commands.ShortcutCommand.execute ( @NotNull final String  args)

◆ getHelp()

String com.realtime.crossfire.jxclient.commands.ShortcutCommand.getHelp ( )

Returns the help text for this command.

Returns
the help text

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

Definition at line 109 of file ShortcutCommand.java.

◆ listSlots()

void com.realtime.crossfire.jxclient.commands.ShortcutCommand.listSlots ( )
private

◆ parseKey()

ShortcutSlot com.realtime.crossfire.jxclient.commands.ShortcutCommand.parseKey ( @NotNull final String  args)
private

Parses a key name. Prints an error message if the key name is invalid.

Parameters
argsthe key name
Returns
the shortcut slot or
null
if the key name is invalid

Definition at line 131 of file ShortcutCommand.java.

References com.realtime.crossfire.jxclient.commands.AbstractCommand.drawInfoError().

Referenced by com.realtime.crossfire.jxclient.commands.ShortcutCommand.deleteSlot(), and com.realtime.crossfire.jxclient.commands.ShortcutCommand.updateSlot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateSlot()

void com.realtime.crossfire.jxclient.commands.ShortcutCommand.updateSlot ( @NotNull final String  args)
private

Updates a slot.

Parameters
argsthe key name and the command

Definition at line 99 of file ShortcutCommand.java.

References com.realtime.crossfire.jxclient.commands.ShortcutCommand.parseKey(), com.realtime.crossfire.jxclient.shortcuts.Shortcuts.setShortcutString(), and com.realtime.crossfire.jxclient.commands.ShortcutCommand.shortcuts.

Referenced by com.realtime.crossfire.jxclient.commands.ShortcutCommand.execute().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ shortcuts

final Shortcuts com.realtime.crossfire.jxclient.commands.ShortcutCommand.shortcuts
private

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