java.lang.Objectcom.realtime.crossfire.jxclient.gui.commands.GUICommandFactory
public class GUICommandFactory
Factory for creating GUICommand instances from string
 representation.
| Field Summary | |
|---|---|
private static java.util.regex.Pattern | 
PATTERN_ENCODE
Pattern matching lines that need a TRAILING_ESCAPE appended. | 
private static java.lang.String | 
TRAILING_ESCAPE
Character appended to lines ending with whitespace.  | 
| Constructor Summary | |
|---|---|
private  | 
GUICommandFactory()
Private constructor to prevent instantiation.  | 
| Method Summary | |
|---|---|
static GUICommand | 
createCommand(java.lang.String commandString,
              CommandCallback commandCallback,
              Commands commands,
              Macros macros)
Create a new GUICommand instance from string representation. | 
static GUICommand | 
createCommandDecode(java.lang.String encodedCommandString,
                    CommandCallback commandCallback,
                    Commands commands,
                    Macros macros)
Create a new GUICommand instance from string representation. | 
private static java.lang.String | 
decode(java.lang.String command)
Decodes a key binding if necessary.  | 
static java.lang.String | 
encode(java.lang.String command)
Encodes a key binding if necessary.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
@NotNull private static final java.util.regex.Pattern PATTERN_ENCODE
TRAILING_ESCAPE appended.
@NotNull private static final java.lang.String TRAILING_ESCAPE
| Constructor Detail | 
|---|
private GUICommandFactory()
| Method Detail | 
|---|
@NotNull
public static GUICommand createCommand(@NotNull
                                               java.lang.String commandString,
                                               @NotNull
                                               CommandCallback commandCallback,
                                               @NotNull
                                               Commands commands,
                                               @NotNull
                                               Macros macros)
GUICommand instance from string representation.
commandString - the command string representationcommandCallback - the command callback to usecommands - the commands instance to usemacros - the macros instance to use
public static GUICommand createCommandDecode(@NotNull
                                             java.lang.String encodedCommandString,
                                             @NotNull
                                             CommandCallback commandCallback,
                                             @NotNull
                                             Commands commands,
                                             @NotNull
                                             Macros macros)
GUICommand instance from string representation.
encodedCommandString - the command string representationcommandCallback - the command callback to usecommands - the commands instance to usemacros - the macros instance to use
@NotNull
private static java.lang.String decode(@NotNull
                                               java.lang.String command)
command - the key binding
@NotNull
public static java.lang.String encode(@NotNull
                                              java.lang.String command)
command - the key binding