Crossfire JXClient, Trunk
|
Public Member Functions | |
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, @Nullable final Resolution resolution, final boolean fullScreen, @NotNull final JXCSkin skin) | |
void | term () |
Static Public Attributes | |
static final boolean | DISABLE_START_GUI = true |
Private Attributes | |
final CrossfireAccountListener | accountListener |
final CharacterModel | characterModel |
final CommandQueue | commandQueue |
final CrossfireQueryListener | crossfireQueryListener |
final CrossfireUpdateItemListener | crossfireUpdateItemListener |
final Exiter | exiter |
final JFrame | frame = new JFrame("") |
final GuiManager | guiManager |
final GuiStateListener | guiStateListener |
final KeyHandler | keyHandler |
final KeyListener | keyListener |
final OptionManager | optionManager |
final SentPacketListener | sentPacketListener |
final CrossfireServerConnection | server |
final WindowFocusListener | windowFocusListener |
final WindowListener | windowListener |
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, | ||
@Nullable final Resolution | resolution, | ||
final boolean | fullScreen, | ||
@NotNull final JXCSkin | skin | ||
) |
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 |
resolution | the size of the client area, null
|
fullScreen | whether full-screen mode should be enabled |
skin | the skin to show |
Definition at line 375 of file JXCWindow.java.
References com.realtime.crossfire.jxclient.main.JXCWindow.accountListener, com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.addCrossfireAccountListener(), com.realtime.crossfire.jxclient.server.crossfire.CrossfireServerConnection.addSentPacketListener(), com.realtime.crossfire.jxclient.util.ResourceUtils.APPLICATION_ICON, com.realtime.crossfire.jxclient.util.Resolution.asDimension(), com.realtime.crossfire.jxclient.main.JXCWindow.characterModel, com.realtime.crossfire.jxclient.main.JXCWindow.commandQueue, com.realtime.crossfire.jxclient.util.Resolution.equals(), 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.window.DialogStateParser.load(), com.realtime.crossfire.jxclient.util.ResourceUtils.loadImage(), com.realtime.crossfire.jxclient.settings.options.OptionManager.loadOptions(), com.realtime.crossfire.jxclient.main.JXCWindow.optionManager, com.realtime.crossfire.jxclient.main.JXCWindow.sentPacketListener, com.realtime.crossfire.jxclient.main.JXCWindow.server, com.realtime.crossfire.jxclient.window.KeyHandler.setDefaultKeyBindings(), com.realtime.crossfire.jxclient.window.GuiManager.setSkin(), com.realtime.crossfire.jxclient.window.GuiManager.unsetSkin(), com.realtime.crossfire.jxclient.window.GuiManager.updateWindowSize(), com.realtime.crossfire.jxclient.main.JXCWindow.windowFocusListener, and com.realtime.crossfire.jxclient.main.JXCWindow.windowListener.
void com.realtime.crossfire.jxclient.main.JXCWindow.term | ( | ) |
Frees all resources. Should be called before the application terminates.
Definition at line 450 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 319 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The CharacterModel to update.
Definition at line 114 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 234 of file JXCWindow.java.
|
private |
The CrossfireUpdateItemListener to receive item updates.
Definition at line 151 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 120 of file JXCWindow.java.
Referenced by 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.JXCWindow(), and com.realtime.crossfire.jxclient.main.JXCWindow.term().
|
private |
The GuiStateListener for detecting established or dropped connections.
Definition at line 249 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The KeyHandler for processing keyboard input.
Definition at line 102 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The KeyListener attached to the main window.
Definition at line 210 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The option manager for this window.
Definition at line 108 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow(), and com.realtime.crossfire.jxclient.main.JXCWindow.term().
|
private |
The SentPacketListener for detecting commands sent to the server.
Definition at line 300 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 135 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().
|
private |
The window listener attached to this frame.
Definition at line 185 of file JXCWindow.java.
Referenced by com.realtime.crossfire.jxclient.main.JXCWindow.JXCWindow().