Package com.io7m.jwheatsheaf.api
Interface JWFileChooserConfigurationType
- All Known Implementing Classes:
JWFileChooserConfiguration
@Immutable
public interface JWFileChooserConfigurationType
The configuration information used to instantiate file choosers.
File choosers have a wide range of configurable properties. The only
mandatory configuration parameter is the
fileSystem(), because
this defines the initial filesystem used for file selection.-
Method Summary
Modifier and TypeMethodDescriptiondefault JWFileChooserActionaction()default booleandefault voidCheck preconditions for the type.default booleanIf set totrue, then when the user is using a mode such asJWFileChooserAction.CREATE, a confirmation dialog will be displayed if the user selects a file that already exists.The CSS stylesheet that will be added to the file chooser UI.The image set used to select images for the file chooser UI.Sets a mode that prevents returning a file to the client if that file does not meet criteria returned by this method.default JWFileSizeFormatterTypedefault FileSystemdefault DateTimeFormatterThe directory to which the chooser will navigate when the user clicks the "home" button.default javafx.stage.Modalitymodality()default booleanDetermine whether to show a link to the parent directory inside the file listing.default JWFileChooserStringOverridesTypetitle()
-
Method Details
-
recentFiles
- Returns:
- The list of recent files to be shown in the file chooser
-
fileSystem
- Returns:
- The file system traversed by the file chooser
-
initialDirectory
- Returns:
- The starting directory
-
homeDirectory
The directory to which the chooser will navigate when the user clicks the "home" button. If no path is specified, the button is not shown.- Returns:
- The user's home directory
-
initialFileName
- Returns:
- The file name initially entered into the selection field
-
title
- Returns:
- A string that will override the generic dialog title
-
fileImageSet
Optional<JWFileImageSetType> fileImageSet()The image set used to select images for the file chooser UI. If no set is specified here, a default set of images and icons will be used.- Returns:
- An image set
-
cssStylesheet
The CSS stylesheet that will be added to the file chooser UI.- Returns:
- The URL of the CSS stylesheet
-
fileFilters
List<JWFileChooserFilterType> fileFilters()- Returns:
- The list of file filters
-
fileFilterDefault
Optional<JWFileChooserFilterType> fileFilterDefault()- Returns:
- The default file filter
-
fileSelectionMode
Sets a mode that prevents returning a file to the client if that file does not meet criteria returned by this method. For example, this may be used to prevent selecting directories by implementing a function that returnstruewhen the file is considered a regular file.- Returns:
- The
Functionthat accepts or rejects selected files
-
allowDirectoryCreation
@Default default boolean allowDirectoryCreation()- Returns:
trueif the UI will allow the creation of directories
-
showParentDirectory
@Default default boolean showParentDirectory()Determine whether to show a link to the parent directory inside the file listing. This entry is always called "..".- Returns:
trueif the directory listing will contain ".."- Since:
- 3.0.0
-
fileTimeFormatter
- Returns:
- The date/time formatter used to display file times
-
fileSizeFormatter
- Returns:
- The formatter used to display file sizes
-
action
- Returns:
- The action that the user is performing
-
checkPreconditions
@Check default void checkPreconditions()Check preconditions for the type. -
confirmFileSelection
@Default default boolean confirmFileSelection()If set totrue, then when the user is using a mode such asJWFileChooserAction.CREATE, a confirmation dialog will be displayed if the user selects a file that already exists.- Returns:
trueif confirmation dialogs should be shown- Since:
- 3.0.0
-
stringOverrides
- Returns:
- A provider of UI string overrides
- Since:
- 3.0.0
-
modality
@Default default javafx.stage.Modality modality()- Returns:
- The modality that will be used for file choosers
- Since:
- 4.0.0
-