Package net.lenni0451.imnbt
Interface ImNbtDrawer
public interface ImNbtDrawer
-
Method Summary
Modifier and TypeMethodDescriptionvoidClose the current popup window.voidexit()Gets called when the File -> Exit menu item is clicked.Get the instance of the about window.net.lenni0451.mcstructs.nbt.io.NamedTagGet the instance of the diff window.intGet the texture id for the tag icons.intGet the amount of tags to display per page.
This is required for large array/list/compound tags to prevent the UI from freezing.
The default value is 500Get the instance of the main window.booleanvoidOpen a popup window on the screen.
This will close the current popup if there is one.voidsetClipboard(net.lenni0451.mcstructs.nbt.io.NamedTag tag) Set the clipboard to the given tag.showOpenFileDialog(String title) Show an open file dialog.
Only one file should be selectable.
Returnnullif the dialog was canceled.showSaveFileDialog(String title) Show a save file dialog.
Returnnullif the dialog was canceled.voidshowWindow(Window window) Open a window to draw it on the screen.
This will close the current window if there is one.
-
Method Details
-
getLinesPerPage
int getLinesPerPage()Get the amount of tags to display per page.
This is required for large array/list/compound tags to prevent the UI from freezing.
The default value is 500- Returns:
- The lines per page
-
getIconsTexture
int getIconsTexture()Get the texture id for the tag icons.- Returns:
- The texture id
-
openPopup
Open a popup window on the screen.
This will close the current popup if there is one.- Parameters:
popup- The popup to open
-
closePopup
void closePopup()Close the current popup window. -
getMainWindow
MainWindow getMainWindow()Get the instance of the main window.- Returns:
- The main window
-
getAboutWindow
AboutWindow getAboutWindow()Get the instance of the about window.- Returns:
- The about window
-
getDiffWindow
DiffWindow getDiffWindow()Get the instance of the diff window.- Returns:
- The diff window
-
showWindow
Open a window to draw it on the screen.
This will close the current window if there is one.- Parameters:
window- The window to open
-
showOpenFileDialog
Show an open file dialog.
Only one file should be selectable.
Returnnullif the dialog was canceled.- Parameters:
title- The title of the dialog- Returns:
- The path to the selected file
-
showSaveFileDialog
Show a save file dialog.
Returnnullif the dialog was canceled.- Parameters:
title- The title of the dialog- Returns:
- The path to the selected file
-
hasClipboard
boolean hasClipboard()- Returns:
- If the clipboard contains a tag
-
setClipboard
void setClipboard(@Nonnull net.lenni0451.mcstructs.nbt.io.NamedTag tag) Set the clipboard to the given tag.- Parameters:
tag- The tag to copy
-
getClipboard
@Nullable net.lenni0451.mcstructs.nbt.io.NamedTag getClipboard()- Returns:
- The clipboard tag
-
exit
void exit()Gets called when the File -> Exit menu item is clicked.
-