mirror of
https://github.com/octopusYan/alist-gui.git
synced 2024-11-24 21:16:42 +08:00
style: 清理代码
This commit is contained in:
parent
95404edc92
commit
09ca87f4f4
@ -9,7 +9,7 @@ import java.util.Optional;
|
||||
/**
|
||||
* @author octopus_yan
|
||||
*/
|
||||
public class AlertBuilder extends BaseBuilder<Alert, ButtonType> {
|
||||
public class AlertBuilder extends BaseBuilder<AlertBuilder, Alert> {
|
||||
|
||||
public AlertBuilder(Alert alert, Window owner) {
|
||||
super(alert, owner);
|
||||
@ -19,7 +19,7 @@ public class AlertBuilder extends BaseBuilder<Alert, ButtonType> {
|
||||
* AlertUtil.confirm
|
||||
*/
|
||||
public void show(AlertUtil.OnClickListener listener) {
|
||||
Optional<ButtonType> result = alert.showAndWait();
|
||||
Optional<ButtonType> result = dialog.showAndWait();
|
||||
result.ifPresent(r -> listener.onClicked(r.getText()));
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ public class AlertBuilder extends BaseBuilder<Alert, ButtonType> {
|
||||
* AlertUtil.confirm
|
||||
*/
|
||||
public void show(AlertUtil.OnChoseListener listener) {
|
||||
Optional<ButtonType> result = alert.showAndWait();
|
||||
Optional<ButtonType> result = dialog.showAndWait();
|
||||
result.ifPresent(r -> {
|
||||
if (r == ButtonType.OK) {
|
||||
listener.confirm();
|
||||
|
Loading…
Reference in New Issue
Block a user