For single-selection mode, returns file.toList
, for multiple-selection mode,
returns all selected files.
A predicate to filter the visible files in the dialog.
A predicate to filter the visible files in the dialog. Files are shown
for which the function returns true
.
Whether the dialog should allow the selection of an existing file
(Open
), an existing folder (Folder
) or a new file/folder (Save
)
Whether it is possible to select multiple files.
Whether it is possible to select multiple files. Defaults to false
.
Since the show
method returns an Option[File]
, the correct procedure is
to check if the option is defined, and if so, to query files
.
Convenience method which will wrap the function in an Option
and call filter_=
A dialog for selecting a file or folder. This tries to automatically select
java.awt.FileDialog
orjavax.swing.JFileChooser
depending on the context. With many look-and-feels, the native (AWT) dialog provides a better experience, for example on OS X. On the other hand, folder selection is not officially supported by AWT, with OS X providing a tricky work-around.The new behaviour selected
JFileChooser
always, when the Web Look-and-Feel is installed, as its component UI is quite sophisticated.