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

Public Member Functions

GUICommand createCommand (@NotNull final String commandString)
 
GUICommand createCommandDecode (@NotNull final String encodedCommandString)
 
String decode (@NotNull final String command)
 
String encode (@NotNull final String command)
 
 GUICommandFactoryImpl (@NotNull final CommandCallback commandCallback, @NotNull final CommandExecutor commandExecutor, @NotNull final Macros macros)
 

Private Attributes

final CommandCallback commandCallback
 
final CommandExecutor commandExecutor
 
final Macros macros
 

Static Private Attributes

static final Pattern PATTERN_ENCODE = Pattern.compile(".*[- \t]$")
 
static final String TRAILING_ESCAPE = "-"
 

Detailed Description

Factory for creating GUICommand instances from string representation.

Author
Andreas Kirschbaum

Definition at line 37 of file GUICommandFactoryImpl.java.

Constructor & Destructor Documentation

◆ GUICommandFactoryImpl()

com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.GUICommandFactoryImpl ( @NotNull final CommandCallback  commandCallback,
@NotNull final CommandExecutor  commandExecutor,
@NotNull final Macros  macros 
)

Creates a new instance.

Parameters
commandCallbackthe command callback to use
commandExecutorthe command executor instance to use
macrosthe macros instance to use

Definition at line 75 of file GUICommandFactoryImpl.java.

References com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.commandCallback, com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.commandExecutor, and com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.macros.

Member Function Documentation

◆ createCommand()

GUICommand com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.createCommand ( @NotNull final String  commandString)

◆ createCommandDecode()

GUICommand com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.createCommandDecode ( @NotNull final String  encodedCommandString)

Creates a new GUICommand instance from string representation.

Parameters
encodedCommandStringthe command string representation
Returns
the new command instance

Implements com.realtime.crossfire.jxclient.gui.commandlist.GUICommandFactory.

Definition at line 87 of file GUICommandFactoryImpl.java.

References com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.createCommand(), and com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.decode().

Here is the call graph for this function:

◆ decode()

String com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.decode ( @NotNull final String  command)

Decodes a key binding if necessary.

Parameters
commandthe key binding
Returns
the decoded key binding

Implements com.realtime.crossfire.jxclient.gui.commandlist.GUICommandFactory.

Definition at line 126 of file GUICommandFactoryImpl.java.

References com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.TRAILING_ESCAPE.

Referenced by com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.createCommandDecode().

Here is the caller graph for this function:

◆ encode()

String com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.encode ( @NotNull final String  command)

Member Data Documentation

◆ commandCallback

final CommandCallback com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.commandCallback
private

◆ commandExecutor

final CommandExecutor com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.commandExecutor
private

◆ macros

final Macros com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.macros
private

◆ PATTERN_ENCODE

final Pattern com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.PATTERN_ENCODE = Pattern.compile(".*[- \t]$")
staticprivate

Pattern matching lines that need a TRAILING_ESCAPE appended.

Definition at line 43 of file GUICommandFactoryImpl.java.

Referenced by com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.encode().

◆ TRAILING_ESCAPE

final String com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl.TRAILING_ESCAPE = "-"
staticprivate

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