public class FileDialogBuilder extends AbstractDialogBuilder<FileDialogBuilder,FileDialog>
FileDialog
class, use this to create instances of that class and to customize
themdescription, extraWindowHints, title
Constructor | Description |
---|---|
FileDialogBuilder() |
Default constructor
|
Modifier and Type | Method | Description |
---|---|---|
protected FileDialog |
buildDialog() |
Builds the dialog according to the builder implementation
|
String |
getActionLabel() |
Returns the label on the confirmation button
|
File |
getSelectedFile() |
Returns the file that is initially selected in the dialog
|
TerminalSize |
getSuggestedSize() |
Returns the suggested size for the file dialog
|
boolean |
isShowHiddenDirectories() |
Checks if hidden files and directories will be visible in the dialog
|
protected FileDialogBuilder |
self() |
Helper method for casting this to
type parameter B |
FileDialogBuilder |
setActionLabel(String actionLabel) |
Defines the label to be but on the confirmation button (default: "ok").
|
FileDialogBuilder |
setSelectedFile(File selectedFile) |
Sets the file that is initially selected in the dialog
|
void |
setShowHiddenDirectories(boolean showHiddenDirectories) |
Sets if hidden files and directories should be visible in the dialog (default:
false |
FileDialogBuilder |
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 FileDialog buildDialog()
AbstractDialogBuilder
buildDialog
in class AbstractDialogBuilder<FileDialogBuilder,FileDialog>
public FileDialogBuilder setActionLabel(String actionLabel)
LocalizedString.Save.toString()
or LocalizedString.Open.toString()
actionLabel
- Label to put on the confirmation buttonpublic String getActionLabel()
public FileDialogBuilder setSuggestedSize(TerminalSize suggestedSize)
suggestedSize
- Suggested size for the file dialogpublic TerminalSize getSuggestedSize()
public FileDialogBuilder setSelectedFile(File selectedFile)
selectedFile
- File that is initially selected in the dialogpublic File getSelectedFile()
public void setShowHiddenDirectories(boolean showHiddenDirectories)
false
showHiddenDirectories
- If true
then hidden files and directories will be visiblepublic boolean isShowHiddenDirectories()
true
then hidden files and directories will be visibleprotected FileDialogBuilder self()
AbstractDialogBuilder
type
parameter B
self
in class AbstractDialogBuilder<FileDialogBuilder,FileDialog>
this
as B
Copyright © 2020. All rights reserved.