mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2024-12-21 07:00:22 +08:00
parent
7de07319d9
commit
20fe5430dd
@ -40,7 +40,7 @@ import java.util.Optional;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
public class MultiFileItem<T> extends VBox {
|
public final class MultiFileItem<T> extends VBox {
|
||||||
private final ObjectProperty<T> selectedData = new SimpleObjectProperty<>(this, "selectedData");
|
private final ObjectProperty<T> selectedData = new SimpleObjectProperty<>(this, "selectedData");
|
||||||
private final ObjectProperty<T> fallbackData = new SimpleObjectProperty<>(this, "fallbackData");
|
private final ObjectProperty<T> fallbackData = new SimpleObjectProperty<>(this, "fallbackData");
|
||||||
|
|
||||||
@ -176,8 +176,8 @@ public class MultiFileItem<T> extends VBox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class StringOption<T> extends Option<T> {
|
public static final class StringOption<T> extends Option<T> {
|
||||||
private JFXTextField customField = new JFXTextField();
|
private final JFXTextField customField = new JFXTextField();
|
||||||
|
|
||||||
public StringOption(String title, T data) {
|
public StringOption(String title, T data) {
|
||||||
super(title, data);
|
super(title, data);
|
||||||
@ -196,7 +196,7 @@ public class MultiFileItem<T> extends VBox {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public StringOption<T> bindBidirectional(Property<String> property) {
|
public StringOption<T> bindBidirectional(Property<String> property) {
|
||||||
customField.textProperty().bindBidirectional(property);
|
FXUtils.bindString(customField, property);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,8 +230,8 @@ public class MultiFileItem<T> extends VBox {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class FileOption<T> extends Option<T> {
|
public static final class FileOption<T> extends Option<T> {
|
||||||
private FileSelector selector = new FileSelector();
|
private final FileSelector selector = new FileSelector();
|
||||||
|
|
||||||
public FileOption(String title, T data) {
|
public FileOption(String title, T data) {
|
||||||
super(title, data);
|
super(title, data);
|
||||||
|
Loading…
Reference in New Issue
Block a user