java.lang.Objectcom.realtime.crossfire.jxclient.main.JXCWindow
public class JXCWindow
The main window.
| Field Summary | |
|---|---|
private CrossfireAccountListener |
accountListener
|
private CharacterModel |
characterModel
|
private CommandQueue |
commandQueue
The command queue instance for this window. |
private CrossfireQueryListener |
crossfireQueryListener
The CrossfireQueryListener attached to server. |
private CrossfireUpdateItemListener |
crossfireUpdateItemListener
The CrossfireUpdateItemListener to receive item updates. |
static boolean |
DISABLE_START_GUI
TODO: Remove when more options are implemented in the start screen gui. |
private Exiter |
exiter
The Exiter to use. |
private java.awt.Frame |
frame
The main window. |
private GuiManager |
guiManager
The GuiManager for controlling the main GUI state. |
private GuiStateListener |
guiStateListener
The GuiStateListener for detecting established or dropped
connections. |
private KeyHandler |
keyHandler
The KeyHandler for processing keyboard input. |
private java.awt.event.KeyListener |
keyListener
The KeyListener attached to the main window. |
private OptionManager |
optionManager
The option manager for this window. |
private java.lang.Object |
semaphoreDrawing
The semaphore for drawing the window contents. |
private SentReplyListener |
sentReplyListener
The SentReplyListener for detecting "reply" commands sent to the
server. |
private CrossfireServerConnection |
server
The CrossfireServerConnection to use. |
private java.awt.event.WindowFocusListener |
windowFocusListener
The WindowFocusListener registered for this window. |
private java.awt.event.WindowListener |
windowListener
The window listener attached to this frame. |
private JXCWindowRenderer |
windowRenderer
The JXCWindowRenderer for this window. |
| Constructor Summary | |
|---|---|
JXCWindow(Exiter exiter,
CrossfireServerConnection server,
OptionManager optionManager,
GuiStateManager guiStateManager,
JXCWindowRenderer windowRenderer,
CommandQueue commandQueue,
GuiManager guiManager,
KeyHandler keyHandler,
CharacterModel characterModel,
javax.swing.JFrame frame)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
init(Resolution resolution,
MouseTracker mouseTracker,
java.lang.String skinName,
boolean fullScreen,
SkinLoader skinLoader)
Initializes the instance: loads and displays the skin. |
void |
term()
Frees all resources. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@NotNull private final CrossfireAccountListener accountListener
@NotNull private final CharacterModel characterModel
@NotNull private final CommandQueue commandQueue
@NotNull private final CrossfireQueryListener crossfireQueryListener
CrossfireQueryListener attached to server. It parses
query messages to open/close dialogs.
@NotNull private final CrossfireUpdateItemListener crossfireUpdateItemListener
CrossfireUpdateItemListener to receive item updates.
public static final boolean DISABLE_START_GUI
@NotNull private final Exiter exiter
Exiter to use.
@NotNull private final java.awt.Frame frame
@NotNull private final GuiManager guiManager
GuiManager for controlling the main GUI state.
@NotNull private final GuiStateListener guiStateListener
GuiStateListener for detecting established or dropped
connections.
@NotNull private final KeyHandler keyHandler
KeyHandler for processing keyboard input.
@NotNull private final java.awt.event.KeyListener keyListener
KeyListener attached to the main window.
@NotNull private final OptionManager optionManager
@NotNull private final java.lang.Object semaphoreDrawing
@NotNull private final SentReplyListener sentReplyListener
SentReplyListener for detecting "reply" commands sent to the
server.
@NotNull private final CrossfireServerConnection server
CrossfireServerConnection to use.
@NotNull private final java.awt.event.WindowFocusListener windowFocusListener
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.
@NotNull private final java.awt.event.WindowListener windowListener
@NotNull private final JXCWindowRenderer windowRenderer
JXCWindowRenderer for this window.
| Constructor Detail |
|---|
public JXCWindow(@NotNull
Exiter exiter,
@NotNull
CrossfireServerConnection server,
@NotNull
OptionManager optionManager,
@NotNull
GuiStateManager guiStateManager,
@NotNull
JXCWindowRenderer windowRenderer,
@NotNull
CommandQueue commandQueue,
@NotNull
GuiManager guiManager,
@NotNull
KeyHandler keyHandler,
@NotNull
CharacterModel characterModel,
@NotNull
javax.swing.JFrame frame)
exiter - the exiter to useserver - the crossfire server connection to useoptionManager - the option manager instance to useguiStateManager - the gui state manager to usewindowRenderer - the window renderer to usecommandQueue - the command queue instanceguiManager - the gui manager instancekeyHandler - the key handler for keyboard inputframe - the frame to use| Method Detail |
|---|
public void init(@Nullable
Resolution resolution,
@NotNull
MouseTracker mouseTracker,
@NotNull
java.lang.String skinName,
boolean fullScreen,
@NotNull
SkinLoader skinLoader)
resolution - the size of the client area, null for
defaultmouseTracker - the mouse tracker to useskinName - the skin to loadfullScreen - whether full-screen mode should be enabledskinLoader - the skin loader instancepublic void term()