use of javafx.scene.layout.AnchorPane in project RIS-PACS by KyleRemil.
the class FrameController method logOut.
public void logOut() {
System.out.println("Logging out.");
Context.getInstance().setRole(1);
Context.getInstance().setStaffId(0);
Context.getInstance().setStaffName("");
Context.getInstance().setUserName("");
try {
AnchorPane root = FXMLLoader.load(getClass().getResource("../view/LoginView.fxml"));
Stage stage = (Stage) tabPane.getScene().getWindow();
Scene scene = new Scene(root);
stage.setScene(scene);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
use of javafx.scene.layout.AnchorPane in project uPMT by coco35700.
the class RootLayoutController method aboutUs.
@FXML
public void aboutUs() {
Stage helpWindow = new Stage(StageStyle.UTILITY);
helpWindow.setTitle(main._langBundle.getString("about_us"));
helpWindow.setResizable(false);
// helpWindow.setAlwaysOnTop(true);
helpWindow.initModality(Modality.APPLICATION_MODAL);
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(getClass().getResource("/view/HelpView.fxml"));
loader.setController(new AboutController(main, helpWindow));
// loader.setController(new HelpController(main, helpWindow, this.document));
loader.setResources(main._langBundle);
AnchorPane layout = (AnchorPane) loader.load();
Scene sc = new Scene(layout);
helpWindow.setScene(sc);
helpWindow.showAndWait();
} catch (IOException e) {
// TODO Exit Program
e.printStackTrace();
}
}
use of javafx.scene.layout.AnchorPane in project dwoss by gg-net.
the class RightsManagmentController method openPersonaManagment.
/**
* Open a Stage in which the given {@link Persona} is edit if the {@link Persona} is not null, if is null it will be a creation of a {@link Persona}.
* <p>
* @param p is the {@link Persona} which is edited, can be null to create a new.
*/
private void openPersonaManagment(Persona p) {
try {
FXMLLoader fxmlLoader = new FXMLLoader();
AnchorPane page = (AnchorPane) fxmlLoader.load(getClass().getResource("PersonaManagmentView.fxml").openStream());
PersonaManagmentController controller = (PersonaManagmentController) fxmlLoader.getController();
controller.setPersona(p);
Stage stage = new Stage();
stage.setTitle("Rollen Managment");
Scene scene = new Scene(page, Color.ALICEBLUE);
stage.setScene(scene);
stage.showAndWait();
resetDeactivePersonas();
resetDeactiveRights();
resetAllRights();
} catch (IOException ex) {
Ui.handle(ex);
}
}
use of javafx.scene.layout.AnchorPane in project trex-stateless-gui by cisco-system-traffic-generator.
the class UIBaseTest method start.
@Override
public void start(Stage stage) throws Exception {
TrexApp.setPrimaryStage(stage);
AnchorPane page = (AnchorPane) FXMLLoader.load(getClass().getResource("/fxml/MainView.fxml"));
Scene scene = new Scene(page);
scene.getStylesheets().add(TrexApp.class.getResource("/styles/mainStyle.css").toExternalForm());
stage.setScene(scene);
stage.setTitle("TRex");
stage.setResizable(true);
stage.setMinWidth(1100);
stage.setMinHeight(670);
stage.show();
}
use of javafx.scene.layout.AnchorPane in project trex-stateless-gui by cisco-system-traffic-generator.
the class AbstractProtocolView method buildUI.
private void buildUI() {
container = new AnchorPane();
buildCustomProtocolView();
setContent(container);
if (dataBinding != null) {
bindProperties();
}
addInputValidation();
}
Aggregations