MCPcopy Create free account
hub / github.com/FabricMC/Matcher / requestConfirmation

Method requestConfirmation

src/main/java/matcher/gui/Gui.java:559–568  ·  view source on GitHub ↗
(String title, String headerText, String text)

Source from the content-addressed store, hash-verified

557 }
558
559 public boolean requestConfirmation(String title, String headerText, String text) {
560 Alert alert = new Alert(AlertType.CONFIRMATION, text);
561
562 alert.setTitle(title);
563 alert.setHeaderText(headerText);
564
565 Platform.runLater(() -> alert.getDialogPane().getScene().getWindow().sizeToScene()); // work around linux display bug (JDK-8193502)
566
567 return alert.showAndWait().orElse(ButtonType.CANCEL) == ButtonType.OK;
568 }
569
570 public static SelectedFile requestFile(String title, Window parent, List<ExtensionFilter> extensionFilters, boolean isOpen) {
571 FileChooser fileChooser = setupFileChooser(title, extensionFilters);

Callers 1

saveMappingsMethod · 0.80

Calls 1

getSceneMethod · 0.80

Tested by

no test coverage detected