Class GuiFactory

java.lang.Object
com.realtime.crossfire.jxclient.skin.skin.GuiFactory

public class GuiFactory extends Object
Factory for creating Gui instances.
  • Constructor Details

    • GuiFactory

      public GuiFactory(@NotNull @NotNull GUICommandFactory guiCommandFactory)
      Creates a new instance.
      Parameters:
      guiCommandFactory - the gui command factory for creating commands
  • Method Details

    • newGui

      @NotNull public @NotNull Gui newGui(@NotNull @NotNull String name)
      Creates a new Gui instance.
      Parameters:
      name - the name of this GUI
      Returns:
      the new gui instance
    • getElementX

      public int getElementX(@NotNull @NotNull AbstractGUIElement element)
      Returns an element's absolute screen coordinate.
      Parameters:
      element - the element
      Returns:
      the element's absolute x coordinate
    • getElementY

      public int getElementY(@NotNull @NotNull AbstractGUIElement element)
      Returns an element's absolute screen coordinate.
      Parameters:
      element - the element
      Returns:
      the element's absolute y coordinate
    • getGui

      @Nullable public @Nullable Gui getGui(@NotNull @NotNull AbstractGUIElement element)
      Returns the Gui an element is part of.
      Parameters:
      element - the element
      Returns:
      the gui or null