From 20fe5430ddc5e9303079d2e2267be246bb6c96e5 Mon Sep 17 00:00:00 2001 From: Glavo Date: Wed, 7 Feb 2024 22:37:56 +0800 Subject: [PATCH] =?UTF-8?q?Close=20#2757:=20=E6=9B=B4=E6=96=B0=20MultiFile?= =?UTF-8?q?Item=20(#2758)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jackhuang/hmcl/ui/construct/MultiFileItem.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/MultiFileItem.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/MultiFileItem.java index b60ef78c5..cd6506fb1 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/MultiFileItem.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/construct/MultiFileItem.java @@ -40,7 +40,7 @@ import java.util.Optional; import java.util.function.Consumer; import java.util.stream.Collectors; -public class MultiFileItem extends VBox { +public final class MultiFileItem extends VBox { private final ObjectProperty selectedData = new SimpleObjectProperty<>(this, "selectedData"); private final ObjectProperty fallbackData = new SimpleObjectProperty<>(this, "fallbackData"); @@ -176,8 +176,8 @@ public class MultiFileItem extends VBox { } } - public static class StringOption extends Option { - private JFXTextField customField = new JFXTextField(); + public static final class StringOption extends Option { + private final JFXTextField customField = new JFXTextField(); public StringOption(String title, T data) { super(title, data); @@ -196,7 +196,7 @@ public class MultiFileItem extends VBox { } public StringOption bindBidirectional(Property property) { - customField.textProperty().bindBidirectional(property); + FXUtils.bindString(customField, property); return this; } @@ -230,8 +230,8 @@ public class MultiFileItem extends VBox { } } - public static class FileOption extends Option { - private FileSelector selector = new FileSelector(); + public static final class FileOption extends Option { + private final FileSelector selector = new FileSelector(); public FileOption(String title, T data) { super(title, data);