Module is.codion.swing.common.ui
Package is.codion.swing.common.ui.dialog
Interface FileSelectionDialogBuilder
- All Superinterfaces:
DialogBuilder<FileSelectionDialogBuilder>
A builder for a file/directory selection dialog
-
Method Summary
Modifier and TypeMethodDescriptionconfirmOverwrite
(boolean confirmOverwrite) fileFilter
(FileFilter fileFilter) selectFileToSave
(String defaultFileName) selectStartDirectory
(boolean selectStartDirectory) Only applies forselectDirectory()
andselectDirectories()
.startDirectory
(String startDirectory) Methods inherited from interface is.codion.swing.common.ui.dialog.DialogBuilder
icon, keyEvent, location, locationRelativeTo, owner, owner, title, title
-
Method Details
-
startDirectory
- Parameters:
startDirectory
- the start directory- Returns:
- this builder instance
-
selectStartDirectory
Only applies forselectDirectory()
andselectDirectories()
.- Parameters:
selectStartDirectory
- if true and a start directory is specified it is selected by default initially, false by default- Returns:
- this builder instance
-
confirmOverwrite
- Parameters:
confirmOverwrite
- specifies whether overwriting a file should be confirmed, true by default- Returns:
- this builder instance
-
fileFilter
- Parameters:
fileFilter
- the file filter to add, only applicable to file selection- Returns:
- this builder instance
-
selectFile
File selectFile()- Returns:
- the selected file
- Throws:
CancelException
- in case the user cancels
-
selectFiles
- Returns:
- the selected files
- Throws:
CancelException
- in case the user cancels
-
selectDirectory
File selectDirectory()- Returns:
- the selected directory
- Throws:
CancelException
- in case the user cancels
-
selectDirectories
- Returns:
- the selected directories
- Throws:
CancelException
- in case the user cancels
-
selectFileOrDirectory
File selectFileOrDirectory()- Returns:
- the selected file or directory
- Throws:
CancelException
- in case the user cancels
-
selectFilesOrDirectories
- Returns:
- a List containing the selected files, contains at least one file
- Throws:
CancelException
- in case the user cancels or no files are selected
-
selectFileToSave
File selectFileToSave()- Returns:
- the selected file
- Throws:
CancelException
- in case the user cancels
-
selectFileToSave
- Parameters:
defaultFileName
- the default file name- Returns:
- the selected file
- Throws:
CancelException
- in case the user cancels
-