Class DirectoryDialog

All Implemented Interfaces:
BasePane, Composite, Window

public class DirectoryDialog extends DialogWindow
Dialog that allows the user to iterate the file system and pick directory.
  • Field Details

    • dirListBox

      private final ActionListBox dirListBox
    • dirBox

      private final TextBox dirBox
    • showHiddenDirs

      private final boolean showHiddenDirs
    • directory

      private File directory
    • selectedDir

      private File selectedDir
  • Constructor Details

    • DirectoryDialog

      public DirectoryDialog(String title, String description, String actionLabel, TerminalSize dialogSize, boolean showHiddenDirs, File selectedObject)
      Default constructor for DirectoryDialog
      Parameters:
      title - Title of the dialog
      description - Description of the dialog, is displayed at the top of the content area
      actionLabel - Label to use on the "confirm" button, for example "open" or "save"
      dialogSize - Rough estimation of how big you want the dialog to be
      showHiddenDirs - If true, hidden directories will be visible
      selectedObject - Initially selected directory node
  • Method Details

    • showDialog

      public File showDialog(WindowBasedTextGUI textGUI)
      Opens the dialog by showing it on the GUI and doesn't return until the dialog has been closed
      Overrides:
      showDialog in class DialogWindow
      Parameters:
      textGUI - Text GUI to add the dialog to
      Returns:
      The directory which was selected in the dialog or null if the dialog was cancelled
    • reloadViews

      private void reloadViews(File directory)