Class DirectoryDialog

  • All Implemented Interfaces:
    com.googlecode.lanterna.gui2.BasePane, com.googlecode.lanterna.gui2.Composite, com.googlecode.lanterna.gui2.Window

    public class DirectoryDialog
    extends com.googlecode.lanterna.gui2.dialogs.DialogWindow
    Dialog that allows the user to iterate the file system and pick directory.
    Author:
    Martin, FracPete (fracpete at waikato dot ac dot nz)
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.googlecode.lanterna.gui2.AbstractBasePane

        com.googlecode.lanterna.gui2.AbstractBasePane.ContentHolder
      • Nested classes/interfaces inherited from interface com.googlecode.lanterna.gui2.Window

        com.googlecode.lanterna.gui2.Window.Hint
    • Field Summary

      • Fields inherited from class com.googlecode.lanterna.gui2.AbstractBasePane

        contentHolder, interactableLookupMap
    • Constructor Summary

      Constructors 
      Constructor Description
      DirectoryDialog​(String title, String description, String actionLabel, com.googlecode.lanterna.TerminalSize dialogSize, boolean showHiddenDirs, File selectedObject)
      Default constructor for DirectoryDialog
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      File showDialog​(com.googlecode.lanterna.gui2.WindowBasedTextGUI textGUI)
      • Methods inherited from class com.googlecode.lanterna.gui2.AbstractWindow

        addWindowListener, close, draw, fromGlobal, getDecoratedSize, getHints, getPosition, getPostRenderer, getPreferredSize, getSize, getTextGUI, getTitle, handleInput, isVisible, removeWindowListener, setCloseWindowWithEscape, setContentOffset, setDecoratedSize, setHints, setPosition, setSize, setTextGUI, setTitle, setVisible, setWindowPostRenderer, toGlobal, waitUntilClosed
      • Methods inherited from class com.googlecode.lanterna.gui2.AbstractBasePane

        addBasePaneListener, getBasePaneListeners, getComponent, getCursorPosition, getFocusedInteractable, getTheme, invalidate, isInvalid, removeBasePaneListener, setComponent, setEnableDirectionBasedMovements, setFocusedInteractable, setFocusedInteractable, setStrictFocusChange, setTheme
      • Methods inherited from interface com.googlecode.lanterna.gui2.BasePane

        getTheme, setEnableDirectionBasedMovements, setStrictFocusChange, setTheme
      • Methods inherited from interface com.googlecode.lanterna.gui2.Window

        getComponent, getCursorPosition, getFocusedInteractable, invalidate, isInvalid, setComponent, setFocusedInteractable
    • Constructor Detail

      • DirectoryDialog

        public DirectoryDialog​(String title,
                               String description,
                               String actionLabel,
                               com.googlecode.lanterna.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 Detail

      • showDialog

        public File showDialog​(com.googlecode.lanterna.gui2.WindowBasedTextGUI textGUI)
        Overrides:
        showDialog in class com.googlecode.lanterna.gui2.dialogs.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