Interface JWFileChooserType


public interface JWFileChooserType
A created file chooser.
  • Method Summary

    Modifier and Type Method Description
    void cancel()
    If the file chooser is open, then hide it and behave as if the user cancelled the selection.
    java.util.List<java.nio.file.Path> result()  
    void setEventListener​(java.util.function.Consumer<JWFileChooserEventType> receiver)
    Add a receiver of events.
    void show()
    Display the file chooser and return immediately.
    java.util.List<java.nio.file.Path> showAndWait()
    Display the file chooser and wait until the user either selects files, or cancels the dialog.
  • Method Details

    • setEventListener

      void setEventListener​(java.util.function.Consumer<JWFileChooserEventType> receiver)
      Add a receiver of events. The given receiver is called whenever the file chooser publishes an event that may need the caller to perform some action (such as display an error dialog box). The receiver is guaranteed to be called on the FX application thread.
      Parameters:
      receiver - The receiver
    • showAndWait

      java.util.List<java.nio.file.Path> showAndWait()
      Display the file chooser and wait until the user either selects files, or cancels the dialog.
      Returns:
      The selected files, if any
    • show

      void show()
      Display the file chooser and return immediately.
    • result

      java.util.List<java.nio.file.Path> result()
      Returns:
      The selected files, if any
    • cancel

      void cancel()
      If the file chooser is open, then hide it and behave as if the user cancelled the selection.