From e021ec3c3fd56442d777cb70cd5af9a83ba61921 Mon Sep 17 00:00:00 2001 From: hades Date: Wed, 12 Jan 2022 14:03:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=97=A0jira=20=E6=89=93=E5=8C=85=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java index 855a1357f..5403ae159 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java +++ b/designer-base/src/main/java/com/fr/design/gui/ifilechooser/JavaFxNativeFileChooser.java @@ -226,6 +226,12 @@ public class JavaFxNativeFileChooser implements FileChooserProvider { return this; } + public Builder filter(String des, String... extensions) { + if (extensions != null) { + this.filters = new FileChooser.ExtensionFilter[]{new FileChooser.ExtensionFilter(des, extensions)}; + } + return this; + } public Builder currentDirectory(File currentDirectory) { if (currentDirectory != null) {