use of com.faforever.client.fx.WindowController in project downlords-faf-client by FAForever.
the class UserInfoWindowController method show.
public void show() {
Assert.checkNullIllegalState(ownerWindow, "ownerWindow must be set");
Stage userInfoWindow = new Stage(StageStyle.TRANSPARENT);
userInfoWindow.initModality(Modality.NONE);
userInfoWindow.initOwner(ownerWindow);
WindowController windowController = uiService.loadFxml("theme/window.fxml");
windowController.configure(userInfoWindow, userInfoRoot, true, CLOSE);
userInfoWindow.show();
}
use of com.faforever.client.fx.WindowController in project downlords-faf-client by FAForever.
the class ExternalReplayInfoGenerator method showExternalReplayInfo.
public void showExternalReplayInfo(Optional<Replay> replay, String replayId) {
if (!replay.isPresent()) {
log.warn("Replay with id '{}' could not be found", replayId);
return;
}
ReplayDetailController replayDetailController = uiService.loadFxml("theme/vault/replay/replay_detail.fxml");
replayDetailController.setReplay(replay.get());
Node replayDetailRoot = replayDetailController.getRoot();
replayDetailRoot.setVisible(true);
replayDetailRoot.requestFocus();
Stage stage = new Stage(StageStyle.UNDECORATED);
WindowController windowController = uiService.loadFxml("theme/window.fxml");
windowController.configure(stage, (Region) ((AnchorPane) replayDetailRoot).getChildren().get(0), true);
replayDetailController.setOnClosure(stage::close);
stage.setWidth(((Region) replayDetailRoot).getWidth());
stage.setHeight(((Region) replayDetailRoot).getHeight());
Stage mainStage = StageHolder.getStage();
stage.setX(mainStage.getX());
stage.setY(mainStage.getY());
stage.show();
}
use of com.faforever.client.fx.WindowController in project downlords-faf-client by FAForever.
the class ChatUserContextMenuController method onUserInfo.
public void onUserInfo() {
UserInfoWindowController userInfoWindowController = uiService.loadFxml("theme/user_info_window.fxml");
userInfoWindowController.setPlayer(player);
Stage userInfoWindow = new Stage(StageStyle.TRANSPARENT);
userInfoWindow.initModality(Modality.NONE);
userInfoWindow.initOwner(chatUserContextMenuRoot.getOwnerWindow());
WindowController windowController = uiService.loadFxml("theme/window.fxml");
windowController.configure(userInfoWindow, userInfoWindowController.getRoot(), true, CLOSE);
userInfoWindow.show();
}
Aggregations