Interface ImNbtDrawer


public interface ImNbtDrawer
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Close the current popup window.
    void
    Gets called when the File -> Exit menu item is clicked.
    Get the instance of the about window.
    net.lenni0451.mcstructs.nbt.io.NamedTag
     
    Get the instance of the diff window.
    int
    Get the texture id for the tag icons.
    int
    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
    Get the instance of the main window.
    boolean
     
    void
    openPopup(Popup<?> popup)
    Open a popup window on the screen.
    This will close the current popup if there is one.
    void
    setClipboard(net.lenni0451.mcstructs.nbt.io.NamedTag tag)
    Set the clipboard to the given tag.
    Show an open file dialog.
    Only one file should be selectable.
    Return null if the dialog was canceled.
    Show a save file dialog.
    Return null if the dialog was canceled.
    void
    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

      void openPopup(@Nonnull Popup<?> popup)
      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

      void showWindow(@Nonnull Window window)
      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

      @Nullable String showOpenFileDialog(String title)
      Show an open file dialog.
      Only one file should be selectable.
      Return null if the dialog was canceled.
      Parameters:
      title - The title of the dialog
      Returns:
      The path to the selected file
    • showSaveFileDialog

      @Nullable String showSaveFileDialog(String title)
      Show a save file dialog.
      Return null if 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.