public class DirectoryDialogBuilder extends AbstractDialogBuilder<DirectoryDialogBuilder,DirectoryDialog>
DirectoryDialog
class, use this to create instances of that class and to customize
them.description, extraWindowHints, title
Constructor | Description |
---|---|
DirectoryDialogBuilder() |
Default constructor
|
Modifier and Type | Method | Description |
---|---|---|
protected DirectoryDialog |
buildDialog() |
Builds the dialog according to the builder implementation
|
String |
getActionLabel() |
Returns the label on the confirmation button
|
File |
getSelectedDirectory() |
Returns the directory that is initially selected in the dialog
|
TerminalSize |
getSuggestedSize() |
Returns the suggested size for the file dialog
|
boolean |
isShowHiddenDirectories() |
Checks if hidden directories will be visible in the dialog
|
protected DirectoryDialogBuilder |
self() |
Helper method for casting this to
type parameter B |
DirectoryDialogBuilder |
setActionLabel(String actionLabel) |
Defines the label to be but on the confirmation button (default: "ok").
|
DirectoryDialogBuilder |
setSelectedDirectory(File selectedDir) |
Sets the directory that is initially selected in the dialog
|
void |
setShowHiddenDirectories(boolean showHiddenDirectories) |
Sets if hidden directories should be visible in the dialog (default:
false |
DirectoryDialogBuilder |
setSuggestedSize(TerminalSize suggestedSize) |
Sets the suggested size for the file dialog, it won't have exactly this size but roughly.
|
build, getDescription, getExtraWindowHints, getTitle, setDescription, setExtraWindowHints, setTitle
protected DirectoryDialog buildDialog()
AbstractDialogBuilder
buildDialog
in class AbstractDialogBuilder<DirectoryDialogBuilder,DirectoryDialog>
public DirectoryDialogBuilder setActionLabel(String actionLabel)
LocalizedString.Save.toString()
or LocalizedString.Open.toString()
actionLabel
- Label to put on the confirmation buttonpublic String getActionLabel()
public DirectoryDialogBuilder setSuggestedSize(TerminalSize suggestedSize)
suggestedSize
- Suggested size for the file dialogpublic TerminalSize getSuggestedSize()
public DirectoryDialogBuilder setSelectedDirectory(File selectedDir)
selectedDir
- Directory that is initially selected in the dialogpublic File getSelectedDirectory()
public void setShowHiddenDirectories(boolean showHiddenDirectories)
false
showHiddenDirectories
- If true
then hidden directories will be visiblepublic boolean isShowHiddenDirectories()
true
then hidden directories will be visibleprotected DirectoryDialogBuilder self()
AbstractDialogBuilder
type
parameter B
self
in class AbstractDialogBuilder<DirectoryDialogBuilder,DirectoryDialog>
this
as B
Copyright © 2020. All rights reserved.