 |
Crossfire JXClient, Trunk
|
Go to the documentation of this file.
23 package com.realtime.crossfire.jxclient.skin.skin;
29 import java.awt.Component;
30 import java.util.ArrayList;
31 import java.util.Collection;
32 import javax.swing.GroupLayout;
33 import javax.swing.JComponent;
34 import org.jetbrains.annotations.NotNull;
35 import org.jetbrains.annotations.Nullable;
52 private final Collection<Gui>
guis =
new ArrayList<>();
71 component.setLayout(
new GroupLayout(component));
84 for (Component component = element; component !=
null &&
getGuiFromComponent(component) ==
null; component = component.getParent()) {
85 x += component.getX();
98 for (Component component = element; component !=
null &&
getGuiFromComponent(component) ==
null; component = component.getParent()) {
99 y += component.getY();
111 for (Component component = element; component !=
null; component = component.getParent()) {
128 if (gui.getComponent() == component) {
133 if (help == component) {
Gui newGui(@NotNull final String name)
Creates a new Gui instance.
Combines a list of GUIElements to for a gui.
Gui getGui(@NotNull final AbstractGUIElement element)
Returns the Gui an element is part of.
Abstract base class for GUI elements to be shown in Guis.
int getElementX(@NotNull final AbstractGUIElement element)
Returns an element's absolute screen coordinate.
int getElementY(@NotNull final AbstractGUIElement element)
Returns an element's absolute screen coordinate.
Manages a set of key bindings.
final GUICommandFactory guiCommandFactory
The GUICommandFactory for creating commands.
Gui getGuiFromComponent(@NotNull final Component component)
Returns the Gui instance for a Component.
JComponent getComponent()
Returns the JComponent for this instance.
Factory for creating Gui instances.
final Collection< Gui > guis
All existing Gui instances.
GuiFactory(@NotNull final GUICommandFactory guiCommandFactory)
Creates a new instance.
Factory for creating GUICommand instances from string representation.