Package net.lenni0451.imnbt.ui.types
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
A popup that can be shown.
There can only be one popup shown at a time.
There can only be one popup shown at a time.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceListener for when a popup is closed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close this popup.Get the callback of the popup.getTitle()Get the title of the popup.voidopen()Open this popup and close the current one.voidrender(ImNbtDrawer drawer) Render the popup content.protected abstract voidrenderContent(ImNbtDrawer drawer) Render the popup content.
-
Constructor Details
-
Popup
-
-
Method Details
-
getTitle
Get the title of the popup.- Returns:
- The title of the popup
-
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
Render the popup content.- Parameters:
drawer- The drawer instance
-
renderContent
Render the popup content.- Parameters:
drawer- The drawer instance
-