cleanup [ci skip]

This commit is contained in:
Sebastian Stenzel
2019-07-19 14:15:45 +02:00
parent 80cff6912b
commit 00c7cae923

View File

@@ -28,25 +28,23 @@ public class FxApplication extends Application {
public void start() {
LOG.trace("FxApplication.start()");
if (Desktop.getDesktop().isSupported(Desktop.Action.APP_PREFERENCES)) {
Desktop.getDesktop().setPreferencesHandler(this::handlePreferences);
}
start(null);
mainWindow.build().showMainWindow();
}
@Override
public void start(Stage stage) {
assert stage == null;
mainWindow.build().showMainWindow();
throw new UnsupportedOperationException("Use start() instead.");
}
private void handlePreferences(PreferencesEvent preferencesEvent) {
Platform.runLater(this::showPreferencesWindow);
}
public void showPreferencesWindow() {
preferencesWindow.build().showPreferencesWindow();
}