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 Detail

      • dirBox

        private final TextBox dirBox
      • showHiddenDirs

        private final boolean showHiddenDirs
      • directory

        private java.io.File directory
      • selectedDir

        private java.io.File selectedDir
    • Constructor Detail

      • DirectoryDialog

        public DirectoryDialog​(java.lang.String title,
                               java.lang.String description,
                               java.lang.String actionLabel,
                               TerminalSize dialogSize,
                               boolean showHiddenDirs,
                               java.io.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 Detail

      • showDialog

        public java.io.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​(java.io.File directory)