Class GUICommandFactoryImpl
java.lang.Object
com.realtime.crossfire.jxclient.gui.textinput.GUICommandFactoryImpl
- All Implemented Interfaces:
GUICommandFactory
Factory for creating
GUICommand instances from string
representation.-
Constructor Summary
ConstructorsConstructorDescriptionGUICommandFactoryImpl(@NotNull CommandCallback commandCallback, @NotNull CommandExecutor commandExecutor, @NotNull Macros macros) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescription@NotNull GUICommandcreateCommand(@NotNull String commandString) Creates a newGUICommandinstance from string representation.createCommandDecode(@NotNull String encodedCommandString) Creates a newGUICommandinstance from string representation.@NotNull StringDecodes a key binding if necessary.@NotNull StringEncodes a key binding if necessary.
-
Constructor Details
-
GUICommandFactoryImpl
public GUICommandFactoryImpl(@NotNull @NotNull CommandCallback commandCallback, @NotNull @NotNull CommandExecutor commandExecutor, @NotNull @NotNull Macros macros) Creates a new instance.- Parameters:
commandCallback- the command callback to usecommandExecutor- the command executor instance to usemacros- the macros instance to use
-
-
Method Details
-
createCommandDecode
Creates a newGUICommandinstance from string representation.- Specified by:
createCommandDecodein interfaceGUICommandFactory- Parameters:
encodedCommandString- the command string representation- Returns:
- the new command instance
-
createCommand
Creates a newGUICommandinstance from string representation.- Specified by:
createCommandin interfaceGUICommandFactory- Parameters:
commandString- the command string representation- Returns:
- the new command instance
-
encode
Encodes a key binding if necessary.- Specified by:
encodein interfaceGUICommandFactory- Parameters:
command- the key binding- Returns:
- the encoded key binding
-
decode
Decodes a key binding if necessary.- Specified by:
decodein interfaceGUICommandFactory- Parameters:
command- the key binding- Returns:
- the decoded key binding
-