|
|
@ -24,6 +24,7 @@ import java.util.List; |
|
|
|
import java.util.concurrent.CountDownLatch; |
|
|
|
import java.util.concurrent.CountDownLatch; |
|
|
|
|
|
|
|
|
|
|
|
public class JavaFxNativeFileChooser implements FileChooserProvider { |
|
|
|
public class JavaFxNativeFileChooser implements FileChooserProvider { |
|
|
|
|
|
|
|
private static boolean showDialogState = false; |
|
|
|
private File[] selectedFiles = new File[0]; |
|
|
|
private File[] selectedFiles = new File[0]; |
|
|
|
private FileSelectionMode fileSelectionMode = FileSelectionMode.FILE; |
|
|
|
private FileSelectionMode fileSelectionMode = FileSelectionMode.FILE; |
|
|
|
private String title = Toolkit.i18nText("Fine-Design_Basic_Open"); |
|
|
|
private String title = Toolkit.i18nText("Fine-Design_Basic_Open"); |
|
|
@ -43,8 +44,17 @@ public class JavaFxNativeFileChooser implements FileChooserProvider { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static boolean isShowDialogState() { |
|
|
|
|
|
|
|
return showDialogState; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static void setShowDialogState(boolean showDialogState) { |
|
|
|
|
|
|
|
JavaFxNativeFileChooser.showDialogState = showDialogState; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public int showDialog(Component parent) { |
|
|
|
public int showDialog(Component parent) { |
|
|
|
|
|
|
|
setShowDialogState(true); |
|
|
|
final CountDownLatch latch = new CountDownLatch(1); |
|
|
|
final CountDownLatch latch = new CountDownLatch(1); |
|
|
|
PlatformImpl.startup(() -> { |
|
|
|
PlatformImpl.startup(() -> { |
|
|
|
}); |
|
|
|
}); |
|
|
|