Class GuiFactory
java.lang.Object
com.realtime.crossfire.jxclient.skin.skin.GuiFactory
Factory for creating
Gui instances.-
Constructor Summary
ConstructorsConstructorDescriptionGuiFactory(@NotNull GUICommandFactory guiCommandFactory) Creates a new instance. -
Method Summary
Modifier and TypeMethodDescriptionintgetElementX(@NotNull AbstractGUIElement element) Returns an element's absolute screen coordinate.intgetElementY(@NotNull AbstractGUIElement element) Returns an element's absolute screen coordinate.@Nullable GuigetGui(@NotNull AbstractGUIElement element) Returns theGuian element is part of.@NotNull GuiCreates a newGuiinstance.
-
Constructor Details
-
GuiFactory
Creates a new instance.- Parameters:
guiCommandFactory- the gui command factory for creating commands
-
-
Method Details
-
newGui
Creates a newGuiinstance.- Parameters:
name- the name of this GUI- Returns:
- the new gui instance
-
getElementX
Returns an element's absolute screen coordinate.- Parameters:
element- the element- Returns:
- the element's absolute x coordinate
-
getElementY
Returns an element's absolute screen coordinate.- Parameters:
element- the element- Returns:
- the element's absolute y coordinate
-
getGui
Returns theGuian element is part of.- Parameters:
element- the element- Returns:
- the gui or
null
-