use of com.install4j.api.launcher.SplashScreen in project downlords-faf-client by FAForever.
the class MainController method display.
public void display() {
eventBus.post(UpdateApplicationBadgeEvent.ofNewValue(0));
Stage stage = StageHolder.getStage();
windowController.configure(stage, mainRoot, true, MINIMIZE, MAXIMIZE_RESTORE, CLOSE);
final WindowPrefs mainWindowPrefs = preferencesService.getPreferences().getMainWindow();
double x = mainWindowPrefs.getX();
double y = mainWindowPrefs.getY();
int width = mainWindowPrefs.getWidth();
int height = mainWindowPrefs.getHeight();
stage.setWidth(width);
stage.setHeight(height);
stage.show();
noCatch(SplashScreen::hide);
enterLoggedOutState();
ObservableList<Screen> screensForRectangle = Screen.getScreensForRectangle(x, y, width, height);
if (screensForRectangle.isEmpty()) {
JavaFxUtil.centerOnScreen(stage);
} else {
stage.setX(x);
stage.setY(y);
}
if (mainWindowPrefs.getMaximized()) {
WindowController.maximize(stage);
}
registerWindowListeners();
}
Aggregations