java.lang.Objectcom.realtime.crossfire.jxclient.main.GuiManagerCommandCallback
public class GuiManagerCommandCallback
A CommandCallback that delegates to a GuiManager.
| Field Summary | |
|---|---|
private Exiter |
exiter
The Exiter instance. |
private GuiManager |
guiManager
The GuiManager to forward to. |
private java.lang.String |
lastAccountPassword
The last sent account or character password. |
private CrossfireServerConnection |
server
The CrossfireServerConnection for sending commands. |
| Constructor Summary | |
|---|---|
GuiManagerCommandCallback(Exiter exiter)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
accountCreate(java.lang.String login,
java.lang.String password)
Creates an account. |
void |
accountCreateCharacter(java.lang.String login)
Creates a character. |
void |
accountLink(int force,
java.lang.String login,
java.lang.String password)
Links a character to the current account. |
void |
accountLogin(java.lang.String login,
java.lang.String password)
Login to an account. |
void |
accountPlayCharacter(java.lang.String name)
Plays a character from the current account. |
void |
activateCommandInput(java.lang.String newText)
Activates the command input text field. |
void |
closeDialog(Gui dialog)
Closes a dialog. |
boolean |
createKeyBinding(boolean perCharacter,
CommandList commandList)
Adds a key binding. |
CommandList |
getCommandList(java.lang.String args)
Returns a command list. |
void |
init(GuiManager guiManager,
CrossfireServerConnection server)
Deprecated. |
void |
openDialog(Gui dialog)
Opens a dialog. |
void |
quitApplication()
Terminates the application. |
boolean |
removeKeyBinding(boolean perCharacter)
Removes a key binding. |
void |
toggleDialog(Gui dialog)
Toggles a dialog. |
void |
updatePlayerName(java.lang.String playerName)
Sets the current player name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@NotNull private final Exiter exiter
Exiter instance.
@NotNull private GuiManager guiManager
GuiManager to forward to.
@Nullable private java.lang.String lastAccountPassword
null if
no password has been sent yet.
@NotNull private CrossfireServerConnection server
CrossfireServerConnection for sending commands.
| Constructor Detail |
|---|
public GuiManagerCommandCallback(@NotNull
Exiter exiter)
exiter - the exiter instance| Method Detail |
|---|
public void accountCreate(@NotNull
java.lang.String login,
@NotNull
java.lang.String password)
accountCreate in interface CommandCallbacklogin - the account's namepassword - the account's password
public void accountCreateCharacter(@NotNull
java.lang.String login)
CommandCallback.accountLogin(java.lang.String, java.lang.String) or CommandCallback.accountCreate(java.lang.String, java.lang.String).
accountCreateCharacter in interface CommandCallbacklogin - the character's name
public void accountLink(int force,
@NotNull
java.lang.String login,
@NotNull
java.lang.String password)
accountLink in interface CommandCallbackforce - 0 to allow failure, 1 to force in certain situationslogin - the character's namepassword - the character's password
public void accountLogin(@NotNull
java.lang.String login,
@NotNull
java.lang.String password)
accountLogin in interface CommandCallbacklogin - loginpassword - password
public void accountPlayCharacter(@NotNull
java.lang.String name)
accountPlayCharacter in interface CommandCallbackname - the character's name
public void activateCommandInput(@NotNull
java.lang.String newText)
activateCommandInput in interface CommandCallbacknewText - the new command text if non-null
public void closeDialog(@NotNull
Gui dialog)
closeDialog in interface CommandCallbackdialog - the dialog to close
public boolean createKeyBinding(boolean perCharacter,
@NotNull
CommandList commandList)
createKeyBinding in interface CommandCallbackperCharacter - whether a per-character key binding should be addedcommandList - the command list to execute on key press
@NotNull
public CommandList getCommandList(@NotNull
java.lang.String args)
throws NoSuchCommandException
getCommandList in interface CommandCallbackargs - the command list arguments
NoSuchCommandException - if the command list does not exist
@Deprecated
public void init(@NotNull
GuiManager guiManager,
@NotNull
CrossfireServerConnection server)
guiManager - the gui manager to forward toserver - the crossfire server connection for sending commands
public void openDialog(@NotNull
Gui dialog)
openDialog in interface CommandCallbackdialog - the dialog to openpublic void quitApplication()
quitApplication in interface CommandCallbackpublic boolean removeKeyBinding(boolean perCharacter)
removeKeyBinding in interface CommandCallbackperCharacter - whether a per-character key binding should be
removed
public void toggleDialog(@NotNull
Gui dialog)
toggleDialog in interface CommandCallbackdialog - the dialog to toggle
public void updatePlayerName(@NotNull
java.lang.String playerName)
updatePlayerName in interface CommandCallbackplayerName - the player name