Class BaseAsyncGUIPane.AbstractBuilder<B extends BaseAsyncGUIPane.AbstractBuilder<B,P,T>,P extends BaseAsyncGUIPane<T,P>,T>

Type Parameters:
B - The Builder that implements this one
P - The BaseAsyncSimpleGUIPane that is built
T - The result of the task
Direct Known Subclasses:
AsyncGUIPane.Builder
Enclosing class:
BaseAsyncGUIPane<T,S extends BaseAsyncGUIPane<T,S>>

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

    • AbstractBuilder

      protected AbstractBuilder(GUI gui, CompletableFuture<T> task)
      Creates a new Builder
      Parameters:
      gui - The gui this Pane belongs to
      task - The running task
  • Method Details

    • onComplete

      public B onComplete(Consumer<T> onComplete)
      Sets the onComplete parameter
      Parameters:
      onComplete - Callback that is executed when the task completes
      Returns:
      this
    • loadingItem

      public B loadingItem(GUIItem loadingGUIItem)
      Sets the loading item that is shown while the task is running
      Parameters:
      loadingGUIItem - The item
      Returns:
      this