Search in sources :

Example 1 with WindowController

use of com.faforever.client.fx.WindowController in project downlords-faf-client by FAForever.

the class EnterPasswordController method showPasswordDialog.

public void showPasswordDialog(Window owner) {
    Stage userInfoWindow = new Stage(StageStyle.TRANSPARENT);
    userInfoWindow.initModality(Modality.NONE);
    userInfoWindow.initOwner(owner);
    WindowController windowController = uiService.loadFxml("theme/window.fxml");
    windowController.configure(userInfoWindow, getRoot(), true, CLOSE);
    userInfoWindow.show();
}
Also used : Stage(javafx.stage.Stage) WindowController(com.faforever.client.fx.WindowController)

Example 2 with WindowController

use of com.faforever.client.fx.WindowController in project downlords-faf-client by FAForever.

the class MapVaultController method openMapUploadWindow.

private void openMapUploadWindow(Path path) {
    MapUploadController mapUploadController = uiService.loadFxml("theme/vault/map/map_upload.fxml");
    mapUploadController.setMapPath(path);
    Stage mapUploadWindow = new Stage(StageStyle.TRANSPARENT);
    mapUploadWindow.initModality(Modality.NONE);
    mapUploadWindow.initOwner(getRoot().getScene().getWindow());
    WindowController windowController = uiService.loadFxml("theme/window.fxml");
    windowController.configure(mapUploadWindow, mapUploadController.getRoot(), true, CLOSE);
    mapUploadWindow.show();
}
Also used : Stage(javafx.stage.Stage) WindowController(com.faforever.client.fx.WindowController)

Example 3 with WindowController

use of com.faforever.client.fx.WindowController in project downlords-faf-client by FAForever.

the class MainController method displayImmediateNotification.

private void displayImmediateNotification(ImmediateNotification notification) {
    ImmediateNotificationController controller = uiService.loadFxml("theme/immediate_notification.fxml");
    controller.setNotification(notification);
    Stage userInfoWindow = new Stage(StageStyle.TRANSPARENT);
    userInfoWindow.initModality(Modality.NONE);
    userInfoWindow.initOwner(StageHolder.getStage().getOwner());
    WindowController windowController = uiService.loadFxml("theme/window.fxml");
    windowController.configure(userInfoWindow, controller.getRoot(), true, CLOSE, MAXIMIZE_RESTORE);
    userInfoWindow.show();
}
Also used : ImmediateNotificationController(com.faforever.client.notification.ImmediateNotificationController) Stage(javafx.stage.Stage) WindowController(com.faforever.client.fx.WindowController)

Example 4 with WindowController

use of com.faforever.client.fx.WindowController in project downlords-faf-client by FAForever.

the class MainController method onSettingsSelected.

public void onSettingsSelected() {
    Stage stage = new Stage(StageStyle.UNDECORATED);
    stage.initOwner(mainRoot.getScene().getWindow());
    SettingsController settingsController = uiService.loadFxml("theme/settings/settings.fxml");
    WindowController windowController = uiService.loadFxml("theme/window.fxml");
    windowController.configure(stage, settingsController.getRoot(), true, CLOSE);
    windowController.setOnHiding(event -> preferencesService.storeInBackground());
    stage.setTitle(i18n.get("settings.windowTitle"));
    stage.show();
}
Also used : Stage(javafx.stage.Stage) WindowController(com.faforever.client.fx.WindowController) SettingsController(com.faforever.client.preferences.ui.SettingsController)

Example 5 with WindowController

use of com.faforever.client.fx.WindowController in project downlords-faf-client by FAForever.

the class ModVaultController method openModUploadWindow.

private void openModUploadWindow(Path path) {
    ModUploadController modUploadController = uiService.loadFxml("theme/vault/mod/mod_upload.fxml");
    modUploadController.setModPath(path);
    Stage modUploadWindow = new Stage(StageStyle.TRANSPARENT);
    modUploadWindow.initModality(Modality.NONE);
    modUploadWindow.initOwner(getRoot().getScene().getWindow());
    WindowController windowController = uiService.loadFxml("theme/window.fxml");
    windowController.configure(modUploadWindow, modUploadController.getRoot(), true, CLOSE);
    modUploadWindow.show();
}
Also used : Stage(javafx.stage.Stage) WindowController(com.faforever.client.fx.WindowController)

Aggregations

WindowController (com.faforever.client.fx.WindowController)8 Stage (javafx.stage.Stage)8 ImmediateNotificationController (com.faforever.client.notification.ImmediateNotificationController)1 SettingsController (com.faforever.client.preferences.ui.SettingsController)1 Node (javafx.scene.Node)1