Class BaseGUIPaneBuilder<G extends GUIPane,B extends BaseGUIPaneBuilder<G,B>>

java.lang.Object
de.placeblock.betterinventories.builder.content.BaseGUISectionBuilder<G,B>
de.placeblock.betterinventories.builder.content.BaseGUIPaneBuilder<G,B>
Type Parameters:
G - The GUIPane type
B - The Builder type
All Implemented Interfaces:
Builder<G,B>
Direct Known Subclasses:
HorizontalSplitGUIPaneBuilder, PaginatorBuilder, SimpleGUIPaneBuilder, SimpleItemGUIPaneBuilder

public abstract class BaseGUIPaneBuilder<G extends GUIPane,B extends BaseGUIPaneBuilder<G,B>> extends BaseGUISectionBuilder<G,B>
Base class for creating GUIPane-Builders
  • Constructor Details

    • BaseGUIPaneBuilder

      public BaseGUIPaneBuilder(GUI gui)
      Creates a new BaseGUIPaneBuilder
      Parameters:
      gui - The GUI for the Pane
  • Method Details

    • maxSize

      public B maxSize(int x, int y)
      Sets the maxSize of the pane. If no maxSize is set at build-time it will use minSize or Size
      Parameters:
      x - The maximum width
      y - The maximum height
      Returns:
      this
    • maxSize

      public B maxSize(Vector2d maxSize)
      Sets the maximum size of the pane. If no maximum size is set at build-time it will use the minimum size or size
      Parameters:
      maxSize - The maximum size
      Returns:
      this
    • minSize

      public B minSize(int x, int y)
      Sets the minimum size of the pane. If no minimum size is set at build-time it will use size or (1,1)
      Parameters:
      x - The minimum width
      y - The minimum height
      Returns:
      this
    • minSize

      public B minSize(Vector2d minSize)
      Sets the minimum size of the pane. If no minimum size is set at build-time it will use size or (1, 1)
      Parameters:
      minSize - The minmum size
      Returns:
      this
    • adoptMinMax

      public B adoptMinMax(GUIPane pane)
      Sets the min and mix size according to the min and max size of the GUIPane
      Parameters:
      pane - The GUIPane from which the size should be taken
      Returns:
      this
    • getBestMaxSize

      protected Vector2d getBestMaxSize()
      Returns:
      The best maximum size (maxSize -> minSize -> size)
    • getBestMinSize

      protected Vector2d getBestMinSize()
      Returns:
      The best minimum size (minSize -> size -> (1,1))