List of usage examples for javafx.scene.control ButtonType PREVIOUS
ButtonType PREVIOUS
To view the source code for javafx.scene.control ButtonType PREVIOUS.
Click Source Link
From source file:de._692b8c32.cdlauncher.MainController.java
public MainController(Application application, Preferences preferences) { this.application = application; this.preferences = preferences; if (preferences.get("basedir", null) == null) { while (new OptionsController(application, preferences).selectDirectory() == null) { new Alert(Alert.AlertType.ERROR, "The launcher needs a directory to store temporary files. Press cancel if you want to close the application.", ButtonType.CANCEL, ButtonType.PREVIOUS).showAndWait().ifPresent(button -> { if (button == ButtonType.CANCEL) { throw new RuntimeException("User requested abort."); }/*from w ww.j av a 2 s. com*/ }); } new Alert(Alert.AlertType.INFORMATION, "Do you want to use a prebuilt version of OpenRA? This is recommended unless you are an OpenRA developer.", ButtonType.NO, ButtonType.YES).showAndWait().ifPresent(button -> { if (button == ButtonType.YES) { preferences.putBoolean("buildFromSources", false); } if (button == ButtonType.NO) { preferences.putBoolean("buildFromSources", true); } }); if (System.getProperty("os.name").toLowerCase().contains("win")) { preferences.put("commandMono", ""); preferences.put("commandMake", ""); } } }