22 package com.realtime.crossfire.jxclient.main;
50 import java.awt.Component;
52 import org.jetbrains.annotations.NotNull;
53 import org.jetbrains.annotations.Nullable;
175 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 GUICommandFactory guiCommandFactory) {
202 final File dir =
new File(skinName);
208 public void raiseDialog(@NotNull
final Component component) {
231 final JXCSkin skin = skinLoader.
load(skinSource, server, guiStateManager, tooltipManager, windowRenderer, elementListener, metaserverModel, characterModel, commandQueue, shortcuts, commandExecutor, currentSpellManager, commandCallback, macros, guiFactory, smoothFaces);
232 if (resolution != null) {
234 throw new JXCSkinException(
"resolution "+resolution+
" is not supported by this skin");
237 throw new JXCSkinException(
"resolution "+resolution+
" is not supported by this skin");
Listener for GUIElement related events.
final JXCWindowRenderer windowRenderer
The JXCWindowRenderer for this window.
static Gui getGui(@NotNull final Component element)
Returns the Gui an element is part of.
Maintains the current GuiState.
JXCSkin loadSkin(@NotNull final String skinName)
Loads a skin file.
Combines a list of GUIElements to for a gui.
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 CurrentSpellManager currentSpellManager, @NotNull final CommandCallback commandCallback, @NotNull final Macros macros, @NotNull final GuiFactory guiFactory, @NotNull final SmoothFaces smoothFaces)
Loads the skin from its external representation.
final CommandQueue commandQueue
The CommandQueue instance.
final SmoothFaces smoothFaces
The SmoothFaces.
boolean isActiveElement(@Nullable final ActivatableGUIElement activeElement)
Returns whether a given gui element is the active element of this dialog.
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 GUICommandFactory guiCommandFactory)
Creates a new instance.
Parser for loading JXCSkin instances from JXCSkinSources.
final CurrentSpellManager currentSpellManager
The CurrentSpellManager instance for this window.
final Shortcuts shortcuts
The Shortcuts instance.
final JXCSkinLoader skinLoader
The JXCSkinLoader instance.
final CharacterModel characterModel
The CharacterModel instance for this window.
Manages image information ("faces") needed to display the map view, items, and spell icons...
Resolution getMaxResolution()
Returns the maximal resolution of this skin.
int getWidth()
Returns the width in pixels.
Defines a JXClient skin consisting of a main Gui and zero or more dialog Guis.
int getHeight()
Returns the height in pixels.
final CommandExecutor commandExecutor
The CommandExecutor instance.
Manages macro expansion in command strings.
A GUIElement that can be set to active or inactive.
Renders a Gui instance into a Frame.
final TooltipManager tooltipManager
The TooltipManager instance.
A JXCSkinSource that loads from files.
Manages the currently selected spell.
Factory for creating Gui instances.
final MetaserverModel metaserverModel
The MetaserverModel instance for this window.
void setActiveElement(@NotNull final ActivatableGUIElement activeElement, final boolean active)
Sets the gui element owning the focus.
Utility class for Gui related functions.
Interface for providers of JXCSkin sources.
Interface that defines callback functions needed by commands.
Factory for creating GUICommand instances from string representation.
Maintains the character list for an account.
final CrossfireServerConnection server
The CrossfireServerConnection to use.
Exception thrown if a skin related problem occurs.
final Resolution resolution
The size of the client area.
final GuiStateManager guiStateManager
The GuiStateManager instance.
Adds encoding/decoding of crossfire protocol packets to a ServerConnection.
Maintains the pending (ncom) commands sent to the server.
Information about JXClient's screen/window resolution.
Loader for JXCSkins and attaching them to the client.
void raiseDialog(@NotNull final Gui dialog)
Raises an already opened dialog.
final Macros macros
The Macros instance.
final GUICommandFactory guiCommandFactory
The GUICommandFactory for creating commands.
Manages a list of Shortcuts.
A JXCSkinSource that loads via the class loader.
final CommandCallback commandCallback
The CommandCallback instance.
Maintains smoothing information received from the Crossfire server.
Resolution getMinResolution()
Returns the minimal resolution of this skin.