List of usage examples for javafx.stage Stage Stage
public Stage()
From source file:com.ggvaidya.scinames.dataset.DatasetSceneController.java
@FXML private void displayData(ActionEvent evt) { TabularDataViewController tdvc = TabularDataViewController.createTabularDataView(); // TODO: modify this so we can edit that data, too! tdvc.getHeaderTextProperty().set("Data contained in dataset " + dataset); // TODO we can search for names here, dude. fillTableViewWithDatasetRows(tdvc.getTableView()); Stage stage = new Stage(); stage.setTitle("Rows from " + dataset.asTitle()); stage.setScene(tdvc.getScene());/*from w w w . j a v a 2 s .c om*/ stage.show(); }
From source file:investiagenofx2.view.InvestiaGenOFXController.java
private void linkAccountTransac(String linkAccountTransac) { try {/*from ww w . j a va 2s . c om*/ FXMLLoader loader = new FXMLLoader(); loader.setLocation(InvestiaGenOFX.class.getResource("view/linkaccountTransac.fxml")); AnchorPane page = (AnchorPane) loader.load(); Stage dialogStage = new Stage(); dialogStage.setTitle("Associer les comptes"); dialogStage.getIcons().add(new Image("/myIcons/Teddy-Bear-Sick-icon.png")); dialogStage.initModality(Modality.WINDOW_MODAL); Scene scene = new Scene(page); dialogStage.initOwner(InvestiaGenOFX.getPrimaryStage()); dialogStage.setScene(scene); InvestiaGenOFX.setOnCloseRequest(dialogStage); LinkaccountTransacController controller = loader.getController(); controller.setlinkAccountTransac(linkAccountTransac); dialogStage.showAndWait(); } catch (Exception ex) { Logger.getLogger(InvestiaGenOFXController.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.cdd.bao.editor.EditSchema.java
public void actionFileNew() { Stage stage = new Stage(); EditSchema edit = new EditSchema(stage); stage.show(); }
From source file:genrsa.GenRSAController.java
/** * Mtodo usado para cargar la ventana de Factorizacin * @param event //from w ww . ja v a 2s.c o m */ public void Factorize(ActionEvent event) { FXMLLoader fxmlLoader; Parent root; try { secondStage = new Stage(); fxmlLoader = new FXMLLoader(getClass().getResource("/Factorize/Factorize.fxml")); root = fxmlLoader.load(); FactorizeController factorController = fxmlLoader.<FactorizeController>getController(); factorController.setRadix(this.radix); if (this.RSA != null) { factorController.getModulus().setText(this.RSA.getN().toString(this.radix).toUpperCase()); } disableOnProgress(true); Scene scene = new Scene(root); secondStage.initModality(Modality.NONE); secondStage.getIcons() .add(new Image(GenRSAController.class.getResourceAsStream("/allImages/genRSA.png"))); secondStage.setTitle("genRSA - Ataque por Factorizacin"); secondStage.setScene(scene); secondStage.show(); secondStage.setOnCloseRequest(closeEvent -> { factorController.getFactorizeAttack().setIsCancelled(true); this.disableOnProgress(false); this.disableButtons(); }); } catch (IOException ex) { //no pongo mensaje de error, porque no se puede dar el caso } }
From source file:genrsa.GenRSAController.java
/** * Mtodo usado para cargar la ventana de ataque ciclico * @param event //from w ww . j a v a 2 s.c o m */ public void Cyclic(ActionEvent event) { FXMLLoader fxmlLoader; Parent root; try { secondStage = new Stage(); fxmlLoader = new FXMLLoader(getClass().getResource("/Cyclic/Cyclic.fxml")); root = fxmlLoader.load(); CyclicController cyclicController = fxmlLoader.<CyclicController>getController(); cyclicController.setRadix(this.radix); if (this.RSA != null) { cyclicController.getModulus().setText(this.RSA.getN().toString(this.radix).toUpperCase()); cyclicController.getExponent().setText(this.RSA.getE().toString(this.radix).toUpperCase()); } else { cyclicController.setFirstTime(false); } disableOnProgress(true); Scene scene = new Scene(root); secondStage.initModality(Modality.NONE); secondStage.getIcons() .add(new Image(GenRSAController.class.getResourceAsStream("/allImages/genRSA.png"))); secondStage.setTitle("genRSA - Ataque Cclico"); secondStage.setScene(scene); secondStage.show(); secondStage.setOnCloseRequest(closeEvent -> { cyclicController.getCyclicAtack().setIsCancelled(true); this.disableOnProgress(false); this.disableButtons(); }); } catch (IOException ex) { //no pongo mensaje de error, porque no se puede dar el caso } }
From source file:com.cdd.bao.editor.EditSchema.java
public void actionFileOpen() { FileChooser chooser = new FileChooser(); chooser.setTitle("Open Schema Template"); if (schemaFile != null) chooser.setInitialDirectory(schemaFile.getParentFile()); File file = chooser.showOpenDialog(stage); if (file == null) return;/* w w w.j a va2 s . c om*/ try { Schema schema = ModelSchema.deserialise(file); Stage stage = new Stage(); EditSchema edit = new EditSchema(stage); edit.loadFile(file, schema); stage.show(); } catch (IOException ex) { ex.printStackTrace(); Util.informWarning("Open", "Failed to parse file: is it a valid schema?"); } }
From source file:ui.main.MainViewController.java
private void takeCall() { if (contactsManager.getAvailabilityforCalling(currentChat.getParticipant())) { try {/*from w ww . j a va 2 s . c om*/ //default configuration and initialization of the form Parent root = FXMLLoader.load(getClass().getClassLoader().getResource("ui/call/CallView.fxml")); Scene scene = new Scene(root); Stage stage = new Stage(); stage.setScene(scene); stage.show(); stage.setResizable(false); stage.setTitle("IMP : Voice"); } catch (IOException ex) { Logger.getLogger(MainViewController.class.getName()).log(Level.SEVERE, null, ex); } } else { Alert alert = new Alert(Alert.AlertType.WARNING); alert.setTitle("IMP"); alert.setHeaderText("Username is unavailable for calling!"); alert.setContentText("The user is not available for calling. " + "Please contact the user or the server administrator"); alert.showAndWait(); } }
From source file:genrsa.GenRSAController.java
/** * Mtodo usado para cargar la ventana de ataque por la paradoja del cumpleaos * @param event // w ww . ja v a 2s.c om */ public void Paradox(ActionEvent event) { FXMLLoader fxmlLoader; Parent root; try { secondStage = new Stage(); fxmlLoader = new FXMLLoader(getClass().getResource("/Paradox/Paradox.fxml")); root = fxmlLoader.load(); ParadoxController paradoxController = fxmlLoader.<ParadoxController>getController(); paradoxController.setRadix(this.radix); if (this.RSA != null) { paradoxController.getModulus().setText(this.RSA.getN().toString(this.radix).toUpperCase()); paradoxController.getExponent().setText(this.RSA.getE().toString(this.radix).toUpperCase()); } else { paradoxController.setFirstTime(false); } disableOnProgress(true); Scene scene = new Scene(root); secondStage.initModality(Modality.NONE); secondStage.getIcons() .add(new Image(GenRSAController.class.getResourceAsStream("/allImages/genRSA.png"))); secondStage.setTitle("genRSA - Ataque por la Paradoja del Cumpleaos"); secondStage.setScene(scene); secondStage.show(); secondStage.setOnCloseRequest(closeEvent -> { paradoxController.getParadoxAttack().setIsCancelled(true); this.disableOnProgress(false); this.disableButtons(); }); } catch (IOException ex) { //no pongo mensaje de error, porque no se puede dar el caso } }
From source file:acmi.l2.clientmod.l2smr.Controller.java
private void showUmodel(final String obj, final String file) { Platform.runLater(() -> {/* ww w .ja v a2 s.c o m*/ try { FXMLLoader loader = new FXMLLoader(getClass().getResource("smview/smview.fxml")); loader.load(); SMView controller = loader.getController(); controller.setStaticmesh(getStaticMeshDir(), file, obj); Scene scene = new Scene(loader.getRoot()); scene.setOnKeyReleased(controller::onKeyReleased); Stage smStage = new Stage(); smStage.setScene(scene); smStage.setTitle(obj); smStage.show(); smStage.setX(Double.parseDouble(L2smr.getPrefs().get("smview.x", String.valueOf(smStage.getX())))); smStage.setY(Double.parseDouble(L2smr.getPrefs().get("smview.y", String.valueOf(smStage.getY())))); smStage.setWidth(Double .parseDouble(L2smr.getPrefs().get("smview.width", String.valueOf(smStage.getWidth())))); smStage.setHeight(Double .parseDouble(L2smr.getPrefs().get("smview.height", String.valueOf(smStage.getHeight())))); InvalidationListener listener = observable -> { L2smr.getPrefs().put("smview.x", String.valueOf(Math.round(smStage.getX()))); L2smr.getPrefs().put("smview.y", String.valueOf(Math.round(smStage.getY()))); L2smr.getPrefs().put("smview.width", String.valueOf(Math.round(smStage.getWidth()))); L2smr.getPrefs().put("smview.height", String.valueOf(Math.round(smStage.getHeight()))); }; smStage.xProperty().addListener(listener); smStage.yProperty().addListener(listener); smStage.widthProperty().addListener(listener); smStage.heightProperty().addListener(listener); } catch (IOException e) { onException("Couldn't show staticmesh", e); } }); }
From source file:investiagenofx2.view.InvestiaGenOFXController.java
private void showInvestmentsSummary(String accountType, Double x, Double y) { try {//from w w w . j a v a 2 s. c o m FXMLLoader loader = new FXMLLoader(); loader.setLocation(InvestiaGenOFX.class.getResource("view/investmentsSummary.fxml")); AnchorPane page = (AnchorPane) loader.load(); Stage dialogStage = new Stage(); dialogStage.setTitle("Sommaire des Investissements " + accountType); dialogStage.getIcons().add(new Image("/myIcons/Teddy-Bear-Sick-icon.png")); dialogStage.initModality(Modality.NONE); Scene scene = new Scene(page); dialogStage.initOwner(InvestiaGenOFX.getPrimaryStage()); dialogStage.setX(x); dialogStage.setY(y); dialogStage.setScene(scene); dialogStage.show(); } catch (Exception ex) { Logger.getLogger(InvestiaGenOFXController.class.getName()).log(Level.SEVERE, null, ex); } }