Crossfire JXClient, Trunk  R20561
com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback Class Reference

A CommandCallback that delegates to a GuiManager. More...

+ Inheritance diagram for com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback:
+ Collaboration diagram for com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback:

Public Member Functions

void accountCreate (@NotNull final String login, @NotNull final String password)
 Creates an account.
Parameters
loginthe account's name
passwordthe account's password
More...
 
void accountCreateCharacter (@NotNull final String login)
 Creates a character.The password should be the last from accountLogin or accountCreate.

Parameters
loginthe character's name
More...
 
void accountLink (final int force, @NotNull final String login, @NotNull final String password)
 Links a character to the current account.
Parameters
force0 to allow failure, 1 to force in certain situations
loginthe character's name
passwordthe character's password
More...
 
void accountLogin (@NotNull final String login, @NotNull final String password)
 Login to an account.
Parameters
loginlogin
passwordpassword
More...
 
void accountPassword (@NotNull final String currentPassword, @NotNull final String newPassword)
 Change the account password.
Parameters
currentPasswordthe current account password
newPasswordthe new account password
More...
 
void accountPlayCharacter (@NotNull final String name)
 Plays a character from the current account.
Parameters
namethe character's name
More...
 
void activateCommandInput (@NotNull final String newText)
 Activates the command input text field.If the skin defines more than one input field, the first matching one is selected. If neither the main gui nor any visible dialog has an input text field, invisible GUIs are checked as well. If one is found, it is made visible.

Parameters
newTextthe new command text if non-
null
More...
 
void closeDialog (@NotNull final String dialog)
 Closes a dialog.Does nothing if the dialog is not open.

Parameters
dialogthe dialog to close
More...
 
boolean createKeyBinding (final boolean perCharacter, @NotNull final CommandList commandList)
 Adds a key binding.
Parameters
perCharacterwhether a per-character key binding should be added
commandListthe command list to execute on key press
Returns
whether the key bindings dialog should be opened
More...
 
CommandList getCommandList (@NotNull final String args) throws NoSuchCommandException
 Returns a command list.
Parameters
argsthe command list arguments
Returns
the command list
Exceptions
NoSuchCommandExceptionif the command list does not exist
More...
 
 GuiManagerCommandCallback (@NotNull final Exiter exiter, @NotNull final CrossfireServerConnection server)
 Creates a new instance. More...
 
void init (@NotNull final GuiManager guiManager)
 Creates a new instance. More...
 
void openDialog (@NotNull final String dialog)
 Opens a dialog.Does nothing if the dialog is open.

Parameters
dialogthe dialog to open
More...
 
void quitApplication ()
 Terminates the application. More...
 
boolean removeKeyBinding (final boolean perCharacter)
 Removes a key binding.
Parameters
perCharacterwhether a per-character key binding should be removed
Returns
whether the key bindings dialog should be opened
More...
 
void toggleDialog (@NotNull final String dialog)
 Toggles a dialog.
Parameters
dialogthe dialog to toggle
More...
 
void updatePlayerName (@NotNull final String playerName)
 Sets the current player name.Does nothing if not currently in the character name prompt.

Parameters
playerNamethe player name
More...
 

Private Attributes

final Exiter exiter
 The Exiter instance. More...
 
GuiManager guiManager
 The GuiManager to forward to. More...
 
String lastAccountPassword = ""
 The last sent account or character password. More...
 
final CrossfireServerConnection server
 The CrossfireServerConnection for sending commands. More...
 

Detailed Description

A CommandCallback that delegates to a GuiManager.

Author
Andreas Kirschbaum

Definition at line 35 of file GuiManagerCommandCallback.java.

Constructor & Destructor Documentation

◆ GuiManagerCommandCallback()

com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.GuiManagerCommandCallback ( @NotNull final Exiter  exiter,
@NotNull final CrossfireServerConnection  server 
)

Creates a new instance.

Parameters
exiterthe exiter instance
serverthe crossfire server connection for sending commands

Definition at line 67 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.exiter, and com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.server.

Member Function Documentation

◆ accountCreate()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.accountCreate ( @NotNull final String  login,
@NotNull final String  password 
)

Creates an account.

Parameters
loginthe account's name
passwordthe account's password

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 167 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.sendAccountCreate().

+ Here is the call graph for this function:

◆ accountCreateCharacter()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.accountCreateCharacter ( @NotNull final String  login)

Creates a character.The password should be the last from accountLogin or accountCreate.

Parameters
loginthe character's name

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 192 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.sendAccountCharacterCreate().

+ Here is the call graph for this function:

◆ accountLink()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.accountLink ( final int  force,
@NotNull final String  login,
@NotNull final String  password 
)

Links a character to the current account.

Parameters
force0 to allow failure, 1 to force in certain situations
loginthe character's name
passwordthe character's password

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 184 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.sendAccountLink().

+ Here is the call graph for this function:

◆ accountLogin()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.accountLogin ( @NotNull final String  login,
@NotNull final String  password 
)

Login to an account.

Parameters
loginlogin
passwordpassword

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 158 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.sendAccountLogin().

+ Here is the call graph for this function:

◆ accountPassword()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.accountPassword ( @NotNull final String  currentPassword,
@NotNull final String  newPassword 
)

Change the account password.

Parameters
currentPasswordthe current account password
newPasswordthe new account password

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 200 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.sendAccountPassword().

+ Here is the call graph for this function:

◆ accountPlayCharacter()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.accountPlayCharacter ( @NotNull final String  name)

Plays a character from the current account.

Parameters
namethe character's name

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 176 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.sendAccountPlay().

+ Here is the call graph for this function:

◆ activateCommandInput()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.activateCommandInput ( @NotNull final String  newText)

Activates the command input text field.If the skin defines more than one input field, the first matching one is selected. If neither the main gui nor any visible dialog has an input text field, invisible GUIs are checked as well. If one is found, it is made visible.

Parameters
newTextthe new command text if non-
null

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 134 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.window.GuiManager.activateCommandInput().

+ Here is the call graph for this function:

◆ closeDialog()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.closeDialog ( @NotNull final String  dialog)

Closes a dialog.Does nothing if the dialog is not open.

Parameters
dialogthe dialog to close

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 109 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.window.GuiManager.closeDialog().

+ Here is the call graph for this function:

◆ createKeyBinding()

boolean com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.createKeyBinding ( final boolean  perCharacter,
@NotNull final CommandList  commandList 
)

Adds a key binding.

Parameters
perCharacterwhether a per-character key binding should be added
commandListthe command list to execute on key press
Returns
whether the key bindings dialog should be opened

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 142 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.window.GuiManager.createKeyBinding().

+ Here is the call graph for this function:

◆ getCommandList()

CommandList com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.getCommandList ( @NotNull final String  args) throws NoSuchCommandException

Returns a command list.

Parameters
argsthe command list arguments
Returns
the command list
Exceptions
NoSuchCommandExceptionif the command list does not exist

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 118 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.window.GuiManager.getCommandList().

+ Here is the call graph for this function:

◆ init()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.init ( @NotNull final GuiManager  guiManager)

Creates a new instance.

Parameters
guiManagerthe gui manager to forward to

Definition at line 77 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.guiManager.

Referenced by com.realtime.crossfire.jxclient.main.JXClient.JXClient().

+ Here is the caller graph for this function:

◆ openDialog()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.openDialog ( @NotNull final String  dialog)

Opens a dialog.Does nothing if the dialog is open.

Parameters
dialogthe dialog to open

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 93 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.window.GuiManager.openDialog().

+ Here is the call graph for this function:

◆ quitApplication()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.quitApplication ( )

Terminates the application.

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 85 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.main.Exiter.terminate().

+ Here is the call graph for this function:

◆ removeKeyBinding()

boolean com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.removeKeyBinding ( final boolean  perCharacter)

Removes a key binding.

Parameters
perCharacterwhether a per-character key binding should be removed
Returns
whether the key bindings dialog should be opened

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 150 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.window.GuiManager.removeKeyBinding().

+ Here is the call graph for this function:

◆ toggleDialog()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.toggleDialog ( @NotNull final String  dialog)

Toggles a dialog.

Parameters
dialogthe dialog to toggle

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 101 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.window.GuiManager.toggleDialog().

+ Here is the call graph for this function:

◆ updatePlayerName()

void com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.updatePlayerName ( @NotNull final String  playerName)

Sets the current player name.Does nothing if not currently in the character name prompt.

Parameters
playerNamethe player name

Implements com.realtime.crossfire.jxclient.gui.textinput.CommandCallback.

Definition at line 126 of file GuiManagerCommandCallback.java.

References com.realtime.crossfire.jxclient.window.GuiManager.updatePlayerName().

+ Here is the call graph for this function:

Member Data Documentation

◆ exiter

final Exiter com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.exiter
private

◆ guiManager

GuiManager com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.guiManager
private

◆ lastAccountPassword

String com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.lastAccountPassword = ""
private

The last sent account or character password.

Set to

""

if no password has been sent yet.

Definition at line 60 of file GuiManagerCommandCallback.java.

◆ server

final CrossfireServerConnection com.realtime.crossfire.jxclient.main.GuiManagerCommandCallback.server
private

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