Crossfire JXClient, Trunk
R20561
|
The main window. More...
Public Member Functions | |
void | init (@Nullable final Resolution resolution, @NotNull final String skinName, final boolean fullScreen, @NotNull final SkinLoader skinLoader) |
Initializes the instance: loads and displays the skin. More... | |
JXCWindow (@NotNull final Exiter exiter, @NotNull final CrossfireServerConnection server, @NotNull final OptionManager optionManager, @NotNull final GuiStateManager guiStateManager, @NotNull final JXCWindowRenderer windowRenderer, @NotNull final CommandQueue commandQueue, @NotNull final GuiManager guiManager, @NotNull final KeyHandler keyHandler, @NotNull final CharacterModel characterModel, @NotNull final JXCConnection connection) | |
Creates a new instance. More... | |
void | term () |
Frees all resources. More... | |
Static Public Attributes | |
static final boolean | DISABLE_START_GUI = true |
TODO: Remove when more options are implemented in the start screen gui. More... | |
The main window.
Definition at line 67 of file JXCWindow.java.
com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow | ( | @NotNull final Exiter | exiter, |
@NotNull final CrossfireServerConnection | server, | ||
@NotNull final OptionManager | optionManager, | ||
@NotNull final GuiStateManager | guiStateManager, | ||
@NotNull final JXCWindowRenderer | windowRenderer, | ||
@NotNull final CommandQueue | commandQueue, | ||
@NotNull final GuiManager | guiManager, | ||
@NotNull final KeyHandler | keyHandler, | ||
@NotNull final CharacterModel | characterModel, | ||
@NotNull final JXCConnection | connection | ||
) |
Creates a new instance.
exiter | the exiter to use |
server | the crossfire server connection to use |
optionManager | the option manager instance to use |
guiStateManager | the gui state manager to use |
windowRenderer | the window renderer to use |
commandQueue | the command queue instance |
guiManager | the gui manager instance |
keyHandler | the key handler for keyboard input |
characterModel | the character model to update |
connection | the connection to update |
Definition at line 424 of file JXCWindow.java.
References com.realtime.crossfire.jxclient.main.JXCWindow.accountListener, com.realtime.crossfire.jxclient.util.ResourceUtils.APPLICATION_ICON, com.realtime.crossfire.jxclient.main.JXCWindow.characterModel, com.realtime.crossfire.jxclient.main.JXCWindow.commandQueue, com.realtime.crossfire.jxclient.main.JXCWindow.exiter, com.realtime.crossfire.jxclient.main.JXCWindow.frame, com.realtime.crossfire.jxclient.main.JXCWindow.guiManager, com.realtime.crossfire.jxclient.main.JXCWindow.guiStateListener, com.realtime.crossfire.jxclient.main.JXCWindow.keyHandler, com.realtime.crossfire.jxclient.main.JXCWindow.keyListener, com.realtime.crossfire.jxclient.util.ResourceUtils.loadImage(), com.realtime.crossfire.jxclient.main.JXCWindow.optionManager, com.realtime.crossfire.jxclient.main.JXCWindow.sentReplyListener, com.realtime.crossfire.jxclient.main.JXCWindow.server, com.realtime.crossfire.jxclient.main.JXCWindow.windowFocusListener, com.realtime.crossfire.jxclient.main.JXCWindow.windowListener, and com.realtime.crossfire.jxclient.main.JXCWindow.windowRenderer.
void com.realtime.crossfire.jxclient.main.JXCWindow.init | ( | @Nullable final Resolution | resolution, |
@NotNull final String | skinName, | ||
final boolean | fullScreen, | ||
@NotNull final SkinLoader | skinLoader | ||
) |
Initializes the instance: loads and displays the skin.
resolution | the size of the client area, null |
skinName | the skin to load |
fullScreen | whether full-screen mode should be enabled |
skinLoader | the skin loader instance |
Definition at line 481 of file JXCWindow.java.
References com.realtime.crossfire.jxclient.util.Resolution.asDimension(), com.realtime.crossfire.jxclient.main.Options.DEFAULT_SKIN, com.realtime.crossfire.jxclient.util.Resolution.equals(), com.realtime.crossfire.jxclient.main.JXCWindow.frame, com.realtime.crossfire.jxclient.skin.skin.JXCSkin.getDefaultKeyBindings(), com.realtime.crossfire.jxclient.skin.skin.JXCSkin.getMaxResolution(), com.realtime.crossfire.jxclient.skin.skin.JXCSkin.getMinResolution(), com.realtime.crossfire.jxclient.main.JXCWindow.guiManager, com.realtime.crossfire.jxclient.main.JXCWindow.keyHandler, com.realtime.crossfire.jxclient.window.DialogStateParser.load(), com.realtime.crossfire.jxclient.settings.options.OptionManager.loadOptions(), com.realtime.crossfire.jxclient.main.JXCWindow.optionManager, com.realtime.crossfire.jxclient.gui.misc.JXCWindowRenderer.setFullScreenMode(), com.realtime.crossfire.jxclient.window.KeyHandler.setKeyBindings(), com.realtime.crossfire.jxclient.window.GuiManager.setSkin(), com.realtime.crossfire.jxclient.gui.misc.JXCWindowRenderer.setWindowMode(), com.realtime.crossfire.jxclient.window.GuiManager.unsetSkin(), com.realtime.crossfire.jxclient.window.GuiManager.updateWindowSize(), and com.realtime.crossfire.jxclient.main.JXCWindow.windowRenderer.
Referenced by com.realtime.crossfire.jxclient.main.JXClient.JXClient().
void com.realtime.crossfire.jxclient.main.JXCWindow.term | ( | ) |
Frees all resources.
Should be called before the application terminates.
Definition at line 527 of file JXCWindow.java.
References com.realtime.crossfire.jxclient.main.JXCWindow.guiManager, com.realtime.crossfire.jxclient.main.JXCWindow.optionManager, com.realtime.crossfire.jxclient.settings.options.OptionManager.saveOptions(), and com.realtime.crossfire.jxclient.window.GuiManager.term().
|
private |
The CrossfireAccountListener attached to server.
Definition at line 330 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The CharacterModel to update.
Definition at line 120 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The command queue instance for this window.
Definition at line 96 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The CrossfireQueryListener attached to server.
It parses query messages to open/close dialogs.
Definition at line 243 of file JXCWindow.java.
|
private |
The CrossfireUpdateItemListener to receive item updates.
Definition at line 154 of file JXCWindow.java.
|
static |
TODO: Remove when more options are implemented in the start screen gui.
Definition at line 72 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXClient.JXClient().
|
private |
The Exiter to use.
Definition at line 78 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The main window.
Definition at line 126 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.init(), and com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The GuiManager for controlling the main GUI state.
Definition at line 84 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.init(), com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow(), and com.realtime.crossfire.jxclient.main.JXCWindow.term().
|
private |
The GuiStateListener for detecting established or dropped connections.
Definition at line 265 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The KeyHandler for processing keyboard input.
Definition at line 108 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.init(), and com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The KeyListener attached to the main window.
Definition at line 219 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The option manager for this window.
Definition at line 114 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.init(), com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow(), and com.realtime.crossfire.jxclient.main.JXCWindow.term().
|
private |
The SentReplyListener for detecting "reply" commands sent to the server.
Definition at line 316 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The CrossfireServerConnection to use.
Definition at line 90 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The WindowFocusListener registered for this window.
It resets the keyboard modifier state when the window loses the focus. The idea is to prevent the following: user switches from JXClient to another window with CTRL+ALT+direction key. This makes JXClient enter RUN mode since CTRL was pressed. The following key release event is not received by JXClient because it does not own the focus. Therefore JXClient's CTRL state is still active when the user switches back to JXClient. A following direction key then causes the character to run which is not what the player wants.
Definition at line 141 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The window listener attached to this frame.
Definition at line 196 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The JXCWindowRenderer for this window.
Definition at line 102 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.init(), and com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().