Class Popup<P extends Popup<P>>

java.lang.Object
net.lenni0451.imnbt.ui.types.Popup<P>
Type Parameters:
P - The type of the popup
Direct Known Subclasses:
EditIndexedTagPopup, EditTagPopup, IntegerInputPopup, MessagePopup, OpenFilePopup, SaveFilePopup, SNbtParserPopup, SNbtSerializerPopup, YesNoPopup

public abstract class Popup<P extends Popup<P>> extends Object
A popup that can be shown.
There can only be one popup shown at a time.
  • Constructor Details

  • Method Details

    • getTitle

      public String getTitle()
      Get the title of the popup.
      Returns:
      The title of the popup
    • getCallback

      public Popup.PopupCallback<P> getCallback()
      Get the callback of the popup.
      Returns:
      The callback of the popup
    • open

      public void open()
      Open this popup and close the current one.
    • close

      public void close()
      Close this popup.
    • render

      public void render(ImNbtDrawer drawer)
      Render the popup content.
      Parameters:
      drawer - The drawer instance
    • renderContent

      protected abstract void renderContent(ImNbtDrawer drawer)
      Render the popup content.
      Parameters:
      drawer - The drawer instance