 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.main;
49 import java.nio.file.Files;
50 import java.nio.file.Path;
51 import java.nio.file.Paths;
52 import org.jetbrains.annotations.NotNull;
53 import org.jetbrains.annotations.Nullable;
169 public SkinLoader(@NotNull
final CommandCallback commandCallback, @NotNull
final MetaserverModel metaserverModel, @Nullable
final Resolution resolution, @NotNull
final Macros macros, @NotNull
final JXCWindowRenderer windowRenderer, @NotNull
final CrossfireServerConnection server, @NotNull
final GuiStateManager guiStateManager, @NotNull
final TooltipManager tooltipManager, @NotNull
final CommandQueue commandQueue, @NotNull
final JXCSkinLoader skinLoader, @NotNull
final CommandExecutor commandExecutor, @NotNull
final Shortcuts shortcuts, @NotNull
final CharacterModel characterModel, @NotNull
final SmoothFaces smoothFaces, @NotNull
final GuiFactory guiFactory) {
196 final Path dir = Paths.get(skinName);
224 final JXCSkin skin =
skinLoader.
load(skinSource,
server,
guiStateManager,
tooltipManager,
windowRenderer, elementListener,
metaserverModel,
characterModel,
commandQueue,
shortcuts,
commandExecutor,
commandCallback,
macros,
smoothFaces);
void raiseDialog(@NotNull final Gui dialog)
Raises an already opened dialog.
JXCSkin loadSkin(@NotNull final String skinName)
Loads a skin file.
Combines a list of GUIElements to for a gui.
Gui getGui(@NotNull final AbstractGUIElement element)
Returns the Gui an element is part of.
A JXCSkinSource that loads via the class loader.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
final TooltipManager tooltipManager
The TooltipManager instance.
final JXCSkinLoader skinLoader
The JXCSkinLoader instance.
final CommandExecutor commandExecutor
The CommandExecutor instance.
Abstract base class for GUI elements to be shown in Guis.
A GUIElement that can be set to active or inactive.
final Shortcuts shortcuts
The Shortcuts instance.
Manages image information ("faces") needed to display the map view, items, and spell icons.
Resolution getMaxResolution()
Returns the maximal resolution of this skin.
final CommandQueue commandQueue
The CommandQueue instance.
final CommandCallback commandCallback
The CommandCallback instance.
Loader for JXCSkins and attaching them to the client.
Exception thrown if a skin related problem occurs.
void setActiveElement(@NotNull final ActivatableGUIElement activeElement, final boolean active)
Sets the gui element owning the focus.
Maintains the character list for an account.
Interface for providers of JXCSkin sources.
final SmoothFaces smoothFaces
The SmoothFaces.
Parser for loading JXCSkin instances from JXCSkinSources.
int getHeight()
Returns the height in pixels.
final JXCWindowRenderer windowRenderer
The JXCWindowRenderer for this window.
Manages macro expansion in command strings.
Maintains the current GuiState.
final CharacterModel characterModel
The CharacterModel instance for this window.
final Resolution resolution
The size of the client area.
final GuiStateManager guiStateManager
The GuiStateManager instance.
JXCSkin load(@NotNull final JXCSkinSource skinSource, @NotNull final CrossfireServerConnection crossfireServerConnection, @NotNull final GuiStateManager guiStateManager, @NotNull final TooltipManager tooltipManager, @NotNull final JXCWindowRenderer windowRenderer, @NotNull final GUIElementListener elementListener, @NotNull final MetaserverModel metaserverModel, @NotNull final CharacterModel characterModel, @NotNull final CommandQueue commandQueue, @NotNull final Shortcuts shortcuts, @NotNull final CommandExecutor commandExecutor, @NotNull final CommandCallback commandCallback, @NotNull final Macros macros, @NotNull final SmoothFaces smoothFaces)
Loads the skin from its external representation.
Renders a Gui instance into a Frame.
SkinLoader(@NotNull final CommandCallback commandCallback, @NotNull final MetaserverModel metaserverModel, @Nullable final Resolution resolution, @NotNull final Macros macros, @NotNull final JXCWindowRenderer windowRenderer, @NotNull final CrossfireServerConnection server, @NotNull final GuiStateManager guiStateManager, @NotNull final TooltipManager tooltipManager, @NotNull final CommandQueue commandQueue, @NotNull final JXCSkinLoader skinLoader, @NotNull final CommandExecutor commandExecutor, @NotNull final Shortcuts shortcuts, @NotNull final CharacterModel characterModel, @NotNull final SmoothFaces smoothFaces, @NotNull final GuiFactory guiFactory)
Creates a new instance.
Information about JXClient's screen/window resolution.
Factory for creating Gui instances.
A JXCSkinSource that loads from files.
final GuiFactory guiFactory
The GuiFactory for creating Gui instances.
Interface that defines callback functions needed by commands.
boolean isActiveElement(@Nullable final ActivatableGUIElement activeElement)
Returns whether a given gui element is the active element of this dialog.
final CrossfireServerConnection server
The CrossfireServerConnection to use.
Defines a JXClient skin consisting of a main Gui and zero or more dialog Guis.
Manages a list of Shortcuts.
final MetaserverModel metaserverModel
The MetaserverModel instance for this window.
Maintains smoothing information received from the Crossfire server.
Maintains the pending (ncom) commands sent to the server.
final Macros macros
The Macros instance.
int getWidth()
Returns the width in pixels.
Resolution getMinResolution()
Returns the minimal resolution of this skin.
Listener for GUIElement related events.