Class DirectoryDialogBuilder
java.lang.Object
com.googlecode.lanterna.gui2.dialogs.AbstractDialogBuilder<DirectoryDialogBuilder, DirectoryDialog>
com.googlecode.lanterna.gui2.dialogs.DirectoryDialogBuilder
public class DirectoryDialogBuilder
extends AbstractDialogBuilder<DirectoryDialogBuilder, DirectoryDialog>
Dialog builder for the
DirectoryDialog class, use this to create instances of that class and to customize
them.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate Fileprivate booleanprivate TerminalSizeFields inherited from class AbstractDialogBuilder
description, extraWindowHints, title -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected DirectoryDialogBuilds the dialog according to the builder implementationReturns the label on the confirmation buttonReturns the directory that is initially selected in the dialogReturns the suggested size for the file dialogbooleanChecks if hidden directories will be visible in the dialogprotected DirectoryDialogBuilderself()Helper method for casting this totypeparameterBsetActionLabel(String actionLabel) Defines the label to be but on the confirmation button (default: "ok").setSelectedDirectory(File selectedDir) Sets the directory that is initially selected in the dialogvoidsetShowHiddenDirectories(boolean showHiddenDirectories) Sets if hidden directories should be visible in the dialog (default:falsesetSuggestedSize(TerminalSize suggestedSize) Sets the suggested size for the file dialog, it won't have exactly this size but roughly.Methods inherited from class AbstractDialogBuilder
build, getDescription, getExtraWindowHints, getTitle, setDescription, setExtraWindowHints, setTitle
-
Field Details
-
actionLabel
-
suggestedSize
-
selectedDir
-
showHiddenDirectories
private boolean showHiddenDirectories
-
-
Constructor Details
-
DirectoryDialogBuilder
public DirectoryDialogBuilder()Default constructor
-
-
Method Details
-
buildDialog
Description copied from class:AbstractDialogBuilderBuilds the dialog according to the builder implementation- Specified by:
buildDialogin classAbstractDialogBuilder<DirectoryDialogBuilder, DirectoryDialog>- Returns:
- New dialog object
-
setActionLabel
Defines the label to be but on the confirmation button (default: "ok"). You probably want to set this toLocalizedString.Save.toString()orLocalizedString.Open.toString()- Parameters:
actionLabel- Label to put on the confirmation button- Returns:
- Itself
-
getActionLabel
Returns the label on the confirmation button- Returns:
- Label on the confirmation button
-
setSuggestedSize
Sets the suggested size for the file dialog, it won't have exactly this size but roughly. Default suggested size is 45x10.- Parameters:
suggestedSize- Suggested size for the file dialog- Returns:
- Itself
-
getSuggestedSize
Returns the suggested size for the file dialog- Returns:
- Suggested size for the file dialog
-
setSelectedDirectory
Sets the directory that is initially selected in the dialog- Parameters:
selectedDir- Directory that is initially selected in the dialog- Returns:
- Itself
-
getSelectedDirectory
Returns the directory that is initially selected in the dialog- Returns:
- Directory that is initially selected in the dialog
-
setShowHiddenDirectories
public void setShowHiddenDirectories(boolean showHiddenDirectories) Sets if hidden directories should be visible in the dialog (default:false- Parameters:
showHiddenDirectories- Iftruethen hidden directories will be visible
-
isShowHiddenDirectories
public boolean isShowHiddenDirectories()Checks if hidden directories will be visible in the dialog- Returns:
- If
truethen hidden directories will be visible
-
self
Description copied from class:AbstractDialogBuilderHelper method for casting this totypeparameterB- Specified by:
selfin classAbstractDialogBuilder<DirectoryDialogBuilder, DirectoryDialog>- Returns:
thisasB
-