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 Details

    • recentFiles

      List<Path> recentFiles()
      Returns:
      The list of recent files to be shown in the file chooser
    • fileSystem

      @Default default FileSystem fileSystem()
      Returns:
      The file system traversed by the file chooser
    • initialDirectory

      Optional<Path> initialDirectory()
      Returns:
      The starting directory
    • homeDirectory

      Optional<Path> 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

      Optional<String> initialFileName()
      Returns:
      The file name initially entered into the selection field
    • title

      Optional<String> 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

      Optional<URL> cssStylesheet()
      The CSS stylesheet that will be added to the file chooser UI.
      Returns:
      The URL of the CSS stylesheet
    • fileFilters

      Returns:
      The list of file filters
    • fileFilterDefault

      Optional<JWFileChooserFilterType> fileFilterDefault()
      Returns:
      The default file filter
    • fileSelectionMode

      @Default default Function<Path,Boolean> 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 returns true when the file is considered a regular file.
      Returns:
      The Function that accepts or rejects selected files
    • allowDirectoryCreation

      @Default default boolean allowDirectoryCreation()
      Returns:
      true if 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:
      true if the directory listing will contain ".."
      Since:
      3.0.0
    • fileTimeFormatter

      @Default default DateTimeFormatter fileTimeFormatter()
      Returns:
      The date/time formatter used to display file times
    • fileSizeFormatter

      @Default default JWFileSizeFormatterType fileSizeFormatter()
      Returns:
      The formatter used to display file sizes
    • action

      @Default default JWFileChooserAction 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 to true, then when the user is using a mode such as JWFileChooserAction.CREATE, a confirmation dialog will be displayed if the user selects a file that already exists.
      Returns:
      true if confirmation dialogs should be shown
      Since:
      3.0.0
    • stringOverrides

      @Default default JWFileChooserStringOverridesType 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