Class BaseHorizontalSplitGUIPane

java.lang.Object
de.placeblock.betterinventories.content.GUISection
de.placeblock.betterinventories.content.pane.GUIPane
de.placeblock.betterinventories.content.pane.impl.BaseHorizontalSplitGUIPane
All Implemented Interfaces:
Sizeable
Direct Known Subclasses:
HorizontalSplitGUIPane, PaginatorGUIPane

public abstract class BaseHorizontalSplitGUIPane extends GUIPane
A GUIPane with an upper and lower pane. Renders the lower pane always below the upper pane.
  • Constructor Details

    • BaseHorizontalSplitGUIPane

      protected BaseHorizontalSplitGUIPane(GUI gui, Vector2d minSize, Vector2d maxSize, GUIPane upperPane, GUIPane lowerPane)
      Creates a new HorizontalSplitGUIPane
      Parameters:
      gui - The GUI
      minSize - The minimum size of the Pane
      maxSize - The maximum size of the Pane
      upperPane - The upper pane
      lowerPane - The lower pane
  • Method Details

    • updateSizeRecursive

      public void updateSizeRecursive(Sizeable parent)
      Is called to recursively update the size of all GUIPanes
      Specified by:
      updateSizeRecursive in class GUIPane
      Parameters:
      parent - The parent Pane or GUI (Sizeable)
    • updateSize

      public void updateSize(Sizeable parent)
      Updates the size of the Pane based on the height of upper and lower Pane.
      Specified by:
      updateSize in class GUIPane
      Parameters:
      parent - The parent Pane or GUI (Sizeable)
    • getChildren

      public List<GUISection> getChildren()
      Description copied from class: GUIPane
      Implemented by GUIPanes Should return all children sections
      Specified by:
      getChildren in class GUIPane
      Returns:
      All children (upper and lower Pane)
    • onItemProvide

      public void onItemProvide(org.bukkit.inventory.ItemStack item)
      Description copied from class: GUIPane
      Called when an item is provided by an inventory MOVE_TO_OTHER_INVENTORY event
      Specified by:
      onItemProvide in class GUIPane
      Parameters:
      item - The provided item. Method reduces the amount of the item by the number that got accepted.
    • render

      public List<org.bukkit.inventory.ItemStack> render()
      Renders the Pane on a list
      Specified by:
      render in class GUISection
      Returns:
      The List
    • getLowerPanePos

      public Vector2d getLowerPanePos()
      Returns:
      The position of the lower Pane taking the height of the upper Pane into account
    • search

      public void search(SearchData searchData)
      Searches the GUISection recursively. The SearchData is filled recursively.
      Specified by:
      search in class GUISection
      Parameters:
      searchData - The searchData that contains all needed information