diff --git a/build.xml b/build.xml
index c15cfc91..5ecd7f96 100644
--- a/build.xml
+++ b/build.xml
@@ -279,7 +279,7 @@
-
+
diff --git a/source/net/filebot/Settings.java b/source/net/filebot/Settings.java
index ac6f7823..6f821695 100644
--- a/source/net/filebot/Settings.java
+++ b/source/net/filebot/Settings.java
@@ -68,7 +68,8 @@ public final class Settings {
}
public static FileChooser getPreferredFileChooser() {
- return FileChooser.valueOf(System.getProperty("net.filebot.UserFiles.fileChooser", FileChooser.Swing.name()));
+ String prop = System.getProperty("net.filebot.UserFiles.fileChooser");
+ return prop == null ? FileChooser.Swing : FileChooser.valueOf(prop);
}
public static int getPreferredThreadPoolSize() {
diff --git a/source/net/filebot/UserFiles.java b/source/net/filebot/UserFiles.java
index 4ca34921..5e03c35f 100644
--- a/source/net/filebot/UserFiles.java
+++ b/source/net/filebot/UserFiles.java
@@ -1,7 +1,6 @@
package net.filebot;
import static java.util.Arrays.*;
-import static java.util.Collections.*;
import static net.filebot.Settings.*;
import static net.filebot.util.ui.SwingUI.*;
@@ -148,48 +147,6 @@ public class UserFiles {
Frame[] frames = Frame.getFrames();
return new FileDialog(frames.length > 0 ? frames[0] : null, title, mode);
}
- },
-
- JavaFX {
- @Override
- public List showLoadDialogSelectFiles(boolean folderMode, boolean multiSelection, File defaultFile, ExtensionFileFilter filter, String title, Object parent) {
- javafx.stage.FileChooser fileChooser = new javafx.stage.FileChooser();
- fileChooser.setTitle(title);
- // fileChooser.getExtensionFilters().add(new javafx.stage.FileChooser.ExtensionFilter(arg0, arg1))
-
- if (defaultFile != null) {
- if (defaultFile.getParentFile() != null) {
- fileChooser.setInitialDirectory(defaultFile.getParentFile());
- }
- fileChooser.setInitialFileName(defaultFile.getName());
- }
-
- if (multiSelection) {
- List files = fileChooser.showOpenMultipleDialog(null);
- if (files != null)
- return files;
- } else {
- File file = fileChooser.showOpenDialog(null);
- if (file != null)
- return singletonList(file);
- }
- return emptyList();
- }
-
- @Override
- public File showSaveDialogSelectFile(boolean folderMode, File defaultFile, String title, Object parent) {
- javafx.stage.FileChooser fileChooser = new javafx.stage.FileChooser();
- fileChooser.setTitle(title);
-
- if (defaultFile != null) {
- if (defaultFile.getParentFile() != null) {
- fileChooser.setInitialDirectory(defaultFile.getParentFile());
- }
- fileChooser.setInitialFileName(defaultFile.getName());
- }
-
- return fileChooser.showSaveDialog(null);
- }
};
public abstract List showLoadDialogSelectFiles(boolean folderMode, boolean multiSelection, File defaultFile, ExtensionFileFilter filter, String title, Object parent);