Class GUISection.AbstractBuilder<B extends GUISection.AbstractBuilder<B,P>,P extends GUISection>

java.lang.Object
de.placeblock.betterinventories.Builder<B,P>
de.placeblock.betterinventories.content.GUISection.AbstractBuilder<B,P>
Type Parameters:
B - The Builder that implements this one
P - The Product that is built
Direct Known Subclasses:
BaseSimpleGUIPane.AbstractBuilder, GUIItem.AbstractBuilder, GUIPane.AbstractBuilder
Enclosing class:
GUISection

public abstract static class GUISection.AbstractBuilder<B extends GUISection.AbstractBuilder<B,P>,P extends GUISection> extends Builder<B,P>
Builder for creating various GUISection
  • Constructor Details

    • AbstractBuilder

      public AbstractBuilder()
  • Method Details

    • adoptMinMax

      public B adoptMinMax(Sizeable sizeable)
      Adops the min and max size from another Sizeable e.g. GUI or GUISection
      Parameters:
      sizeable - The sizeable to adopt the size from
      Returns:
      Itself
    • size

      public B size(Vector2d size)
      Sets the size attribute
      Parameters:
      size - The sizeable to adopt the size from
      Returns:
      Itself
    • size

      public B size(int x, int y)
      Sets the size attribute
      Parameters:
      x - The x part of the new size
      y - The y part of the new size
      Returns:
      Itself
    • minSize

      public B minSize(Vector2d minSize)
      Sets the minSize attribute
      Parameters:
      minSize - The minimum size of the section
      Returns:
      Itself
    • minSize

      public B minSize(int x, int y)
      Sets the minSize attribute
      Parameters:
      x - The x part of the new minSize
      y - The y part of the new minSize
      Returns:
      Itself
    • maxSize

      public B maxSize(Vector2d maxSize)
      Sets the maxSize attribute
      Parameters:
      maxSize - The maximum size of the section
      Returns:
      Itself
    • maxSize

      public B maxSize(int x, int y)
      Sets the maxSize attribute
      Parameters:
      x - The x part of the new maxSize
      y - The y part of the new maxSize
      Returns:
      Itself
    • getMinSize

      protected Vector2d getMinSize()
      Used to get the current minimum size. Throws an exception if min-size and size are null
      Returns:
      The current minSize
    • getMaxSize

      protected Vector2d getMaxSize()
      Used to get the current maximum size. Throws an exception if max-size and size are null
      Returns:
      The current maxSize