public class GuiFactory
extends java.lang.Object
Gui
instances.Constructor and Description |
---|
GuiFactory(@NotNull GUICommandFactory guiCommandFactory)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
int |
getElementX(@NotNull AbstractGUIElement element)
Returns an element's absolute screen coordinate.
|
int |
getElementY(@NotNull AbstractGUIElement element)
Returns an element's absolute screen coordinate.
|
@Nullable Gui |
getGui(@NotNull AbstractGUIElement element)
Returns the
Gui an element is part of. |
@NotNull Gui |
newGui(@NotNull java.lang.String name)
Creates a new
Gui instance. |
public GuiFactory(@NotNull @NotNull GUICommandFactory guiCommandFactory)
guiCommandFactory
- the gui command factory for creating commands@NotNull public @NotNull Gui newGui(@NotNull @NotNull java.lang.String name)
Gui
instance.name
- the name of this GUIpublic int getElementX(@NotNull @NotNull AbstractGUIElement element)
element
- the elementpublic int getElementY(@NotNull @NotNull AbstractGUIElement element)
element
- the element@Nullable public @Nullable Gui getGui(@NotNull @NotNull AbstractGUIElement element)
Gui
an element is part of.element
- the elementnull