Interface FileChooserHandle


public interface FileChooserHandle
A modal JFileChooser shown by a Browse button on a "Directory chooser" or "File chooser" form component.

Reach this handle via Session.fileChooser().

  • Method Details

    • selectFile

      @NotNull FileChooserHandle selectFile(@NotNull File file)
      Select the given file in the chooser.
    • selectDirectory

      @NotNull FileChooserHandle selectDirectory(@NotNull File directory)
      Select the given directory in the chooser.
    • approve

      void approve()
      Click the chooser's Approve button, typically "Open" or "Save".
    • cancel

      void cancel()
      Click the chooser's Cancel button.
    • getCurrentDirectory

      @NotNull File getCurrentDirectory()
      The directory the chooser is currently showing.
    • getSelectedFile

      @Nullable File getSelectedFile()
      The currently selected file, or null if none is selected.