Class BaseAsyncGUIPane<T,S extends BaseAsyncGUIPane<T,S>>
java.lang.Object
de.placeblock.betterinventories.content.GUISection
de.placeblock.betterinventories.content.pane.GUIPane
de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleGUIPane<GUISection,S>
de.placeblock.betterinventories.content.pane.impl.async.BaseAsyncGUIPane<T,S>
- Type Parameters:
T- Result of the async taskS- The implementing class to return this-type correctly e.g.BaseSimpleGUIPane.addItemEmptySlot(GUIItem)
- All Implemented Interfaces:
Sizeable
- Direct Known Subclasses:
AsyncGUIPane
public abstract class BaseAsyncGUIPane<T,S extends BaseAsyncGUIPane<T,S>>
extends BaseSimpleGUIPane<GUISection,S>
Base class for
AsyncGUIPane-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classBaseAsyncGUIPane.AbstractBuilder<B extends BaseAsyncGUIPane.AbstractBuilder<B,P, T>, P extends BaseAsyncGUIPane<T, P>, T> Builder for creatingBaseAsyncGUIPaneNested classes/interfaces inherited from class de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleGUIPane
BaseSimpleGUIPane.ChildData<C extends GUISection> -
Field Summary
Fields inherited from class de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleGUIPane
autoSize, contentFields inherited from class de.placeblock.betterinventories.content.GUISection
maxSize, minSize -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBaseAsyncGUIPane(GUI gui, Vector2d minSize, Vector2d maxSize, boolean autoSize, CompletableFuture<T> task, @Nullable Consumer<T> onComplete, GUIItem loadingGUIItem) Creates a new BaseSimpleGUIPane -
Method Summary
Modifier and TypeMethodDescriptionprotected voidonTaskComplete(T data) Called when the task completes.Methods inherited from class de.placeblock.betterinventories.content.pane.impl.simple.BaseSimpleGUIPane
addItemEmptySlot, clear, fill, getChildren, getNextEmptySlot, getSections, onItemProvide, removeSection, removeSection, render, search, setSection, setSectionAt, setSectionAt, updateSize, updateSizeRecursiveMethods inherited from class de.placeblock.betterinventories.content.pane.GUIPane
onItemAdd, onItemAmount, onItemClick, onItemRemove, onItemRemoveTroughInventoryClose, onSizeChange, provideItem, renderOnList, setHeight, setSize, setWidth, updateChildrenRecursiveMethods inherited from class de.placeblock.betterinventories.content.GUISection
getEmptyContentList, getHeight, getSlots, getWidth, 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
-
BaseAsyncGUIPane
protected BaseAsyncGUIPane(GUI gui, Vector2d minSize, Vector2d maxSize, boolean autoSize, CompletableFuture<T> task, @Nullable @Nullable Consumer<T> onComplete, GUIItem loadingGUIItem) Creates a new BaseSimpleGUIPane- Parameters:
gui- The GUIminSize- The minimum size of the PanemaxSize- The maximum size of the PaneautoSize- Whether to automatically resize the pane according to the children. If true it will set the size to the bounding box of all children.task- The running taskonComplete- The callback that is executed when the task finishesloadingGUIItem- The item that is shown while the task is running
-
-
Method Details
-
onTaskComplete
Called when the task completes. Can be overridden to use it instead of the callback- Parameters:
data- The result of the task
-