Class BaseSimpleItemGUIPane<S extends BaseSimpleItemGUIPane<S>>

Type Parameters:
S - The implementing class to return this-type correctly e.g. BaseSimpleGUIPane.addItemEmptySlot(GUIItem)
All Implemented Interfaces:
Sizeable
Direct Known Subclasses:
BaseIOGUIPane, BasePaginatorControlsPane, SimpleItemGUIPane

public abstract class BaseSimpleItemGUIPane<S extends BaseSimpleItemGUIPane<S>> extends BaseSimpleGUIPane<GUIItem,S>
Base class for various SimpleItemGUIPanes. Implementation of BaseSimpleGUIPane that can contain only GUIItem.
  • Constructor Details

    • BaseSimpleItemGUIPane

      protected BaseSimpleItemGUIPane(GUI gui, Vector2d minSize, Vector2d maxSize, boolean autoSize)
      Creates a new SimpleGUIPane
      Parameters:
      gui - The GUI
      minSize - The minimum size of the Pane
      maxSize - The maximum size of the Pane
      autoSize - Whether to automatically resize the pane according to the children. If true it will set the size to the bounding box of all children.
  • Method Details

    • flipY

      public void flipY()
      Flips all items on the Y axis. Items on the left will be on the right and vice versa.
    • flipX

      public void flipX()
      Flips all items on the X axis. Items on the top will be on the bottom and vice versa.
    • shiftX

      public void shiftX(int delta)
      Shifts Items to the left or right
      Parameters:
      delta - The delta (positive to shift to the right)
    • shiftY

      public void shiftY(int delta)
      Shifts Items to the top or bottom
      Parameters:
      delta - The delta (positive to shift to the bottom)
    • getItem

      public GUIItem getItem(int slot)
      Returns an item for a given slot
      Parameters:
      slot - The slot
      Returns:
      The item or null
    • getItem

      public GUIItem getItem(Vector2d position)
      Returns an item for a given position
      Parameters:
      position - The position
      Returns:
      The item or null