Package javascript.swing
Class JSFilePicker
- java.lang.Object
-
- javascript.swing.JSFilePicker
-
public class JSFilePicker extends java.lang.Object
A file selector based on the JavaScript File System Access API- Author:
- gianpiero.diblasi
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
showDirectoryPicker(DirectoryPickerOptions options, simulation.js.$Apply_1_Void<FileSystemDirectoryHandle> response)
Shows a directory pickerstatic void
showOpenFilePicker(FilePickerOptions options, int maximumFileSize, simulation.js.$Apply_1_Void<def.js.Array<FileSystemFileHandle>> response)
Shows an open file pickerstatic void
showSaveFilePicker(FilePickerOptions options, simulation.js.$Apply_1_Void<FileSystemFileHandle> response)
Shows a save file picker
-
-
-
Method Detail
-
showDirectoryPicker
public static void showDirectoryPicker(DirectoryPickerOptions options, simulation.js.$Apply_1_Void<FileSystemDirectoryHandle> response)
Shows a directory picker- Parameters:
options
- The optionsresponse
- The function to call on close
-
showOpenFilePicker
public static void showOpenFilePicker(FilePickerOptions options, int maximumFileSize, simulation.js.$Apply_1_Void<def.js.Array<FileSystemFileHandle>> response)
Shows an open file picker- Parameters:
options
- The optionsmaximumFileSize
- The maximum allowed file size in Mbytes, a value less than or equal to 0 to set no constraint on the sizeresponse
- The function to call on close
-
showSaveFilePicker
public static void showSaveFilePicker(FilePickerOptions options, simulation.js.$Apply_1_Void<FileSystemFileHandle> response)
Shows a save file picker- Parameters:
options
- The optionsresponse
- The function to call on close
-
-