Package adams.terminal.dialog
Class DirectoryDialog
- java.lang.Object
-
- com.googlecode.lanterna.gui2.AbstractBasePane<com.googlecode.lanterna.gui2.Window>
-
- com.googlecode.lanterna.gui2.AbstractWindow
-
- com.googlecode.lanterna.gui2.dialogs.DialogWindow
-
- adams.terminal.dialog.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)
-
-
Constructor Summary
Constructors Constructor Description DirectoryDialog(String title, String description, String actionLabel, com.googlecode.lanterna.TerminalSize dialogSize, boolean showHiddenDirs, File selectedObject)
Default constructor forDirectoryDialog
-
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 class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
DirectoryDialog
public DirectoryDialog(String title, String description, String actionLabel, com.googlecode.lanterna.TerminalSize dialogSize, boolean showHiddenDirs, File selectedObject)
Default constructor forDirectoryDialog
- Parameters:
title
- Title of the dialogdescription
- Description of the dialog, is displayed at the top of the content areaactionLabel
- Label to use on the "confirm" button, for example "open" or "save"dialogSize
- Rough estimation of how big you want the dialog to beshowHiddenDirs
- Iftrue
, hidden directories will be visibleselectedObject
- Initially selected directory node
-
-
Method Detail
-
showDialog
public File showDialog(com.googlecode.lanterna.gui2.WindowBasedTextGUI textGUI)
- Overrides:
showDialog
in classcom.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
-
-