Class GUIPane
java.lang.Object
de.placeblock.betterinventories.content.GUISection
de.placeblock.betterinventories.content.pane.GUIPane
- All Implemented Interfaces:
Sizeable
- Direct Known Subclasses:
BaseSimpleGUIPane,HorizontalSplitGUIPane
A
How the own size is updated can be implemented by the different
GUISection that can contain other GUISections.
Renders to a List.
How the own size is updated can be implemented by the different
GUIPanes.-
Field Summary
Fields inherited from class de.placeblock.betterinventories.content.GUISection
maxSize, minSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract Set<GUISection>Implemented by GUIPanes Should return all children sectionsvoidCan be overridden and is only called when the size of this GUIPane really changes.protected voidrenderOnList(GUISection section, Vector2d position, List<org.bukkit.inventory.ItemStack> content) Renders a child section at a specific position on a listvoidsetHeight(int height) Sets the new height by usingsetSize(Vector2d)voidSets the size and callsonSizeChange()if changed.voidsetWidth(int width) Sets the new width by usingsetSize(Vector2d)protected voidupdateChildrenRecursive(Sizeable parent) Updates the size of all children recursiveabstract voidupdateSize(Sizeable parent) Recalculates the size of the Pane when implementedabstract voidupdateSizeRecursive(Sizeable parent) Is called to recursively update the size of allGUIPanesMethods inherited from class de.placeblock.betterinventories.content.GUISection
getEmptyContentList, getHeight, getSectionAt, getSectionAt, getSlots, getWidth, render, slotToVector, vectorToSlotMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface de.placeblock.betterinventories.Sizeable
clampSize, getMaxSize, getMinSize, getSize
-
Constructor Details
-
GUIPane
Creates a new GUIPane- Parameters:
gui- The GUIminSize- The minimum size of the PanemaxSize- The maximum size of the Pane
-
-
Method Details
-
setSize
Sets the size and callsonSizeChange()if changed.- Overrides:
setSizein classGUISection- Parameters:
size- The new size
-
setHeight
public void setHeight(int height) Sets the new height by usingsetSize(Vector2d)- Parameters:
height- The new height
-
setWidth
public void setWidth(int width) Sets the new width by usingsetSize(Vector2d)- Parameters:
width- The new width
-
updateSizeRecursive
Is called to recursively update the size of allGUIPanes- Parameters:
parent- The parent Pane or GUI (Sizeable)
-
updateSize
Recalculates the size of the Pane when implemented- Parameters:
parent- The parent Pane or GUI (Sizeable)
-
updateChildrenRecursive
Updates the size of all children recursive- Parameters:
parent- The parent Pane or GUI (Sizeable)
-
onSizeChange
public void onSizeChange()Can be overridden and is only called when the size of this GUIPane really changes. -
getChildren
Implemented by GUIPanes Should return all children sections- Returns:
- All child sections
-
renderOnList
protected void renderOnList(GUISection section, Vector2d position, List<org.bukkit.inventory.ItemStack> content) Renders a child section at a specific position on a list- Parameters:
section- The child sectionposition- The child position the child is atcontent- The list on which the section should be rendered. Has to have the size of this GUIPane, otherwise it can lead to exceptions.
-