|
|
|
@ -155,22 +155,4 @@ public class JavaFxNativeFileChooser implements FileChooserProvider {
|
|
|
|
|
this.filters = builder.filters; |
|
|
|
|
this.currentDirectory = builder.currentDirectory; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public static void main(String[] args) { |
|
|
|
|
|
|
|
|
|
FileChooserProvider fileChooserProvider = |
|
|
|
|
new Builder(). |
|
|
|
|
fileSelectionMode(FileSelectionMode.DIR). |
|
|
|
|
title("hhh"). |
|
|
|
|
filters(new FileChooser.ExtensionFilter[]{ |
|
|
|
|
new FileChooser.ExtensionFilter("TXT", "*.txt"), |
|
|
|
|
new FileChooser.ExtensionFilter("PNG", "*.png")}). |
|
|
|
|
currentDirectory(new File("D://")). |
|
|
|
|
build(); |
|
|
|
|
fileChooserProvider.showDialog(null); |
|
|
|
|
System.out.println(fileChooserProvider.getSelectedFiles().length); |
|
|
|
|
System.out.println(fileChooserProvider.getSelectedFile()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |