List of usage examples for javafx.geometry Pos BOTTOM_RIGHT
Pos BOTTOM_RIGHT
To view the source code for javafx.geometry Pos BOTTOM_RIGHT.
Click Source Link
From source file:patientmanagerv1.HomeController.java
public void assistantSign() { final Stage dialog = new Stage(); dialog.initModality(Modality.APPLICATION_MODAL); final TextField textField = new TextField(); Button submit = new Button(); Button cancel = new Button(); final Label label = new Label(); cancel.setText("Cancel"); cancel.setAlignment(Pos.CENTER);/* w w w . ja va2s . com*/ submit.setText("Submit"); submit.setAlignment(Pos.BOTTOM_RIGHT); final VBox dialogVbox = new VBox(20); dialogVbox.getChildren().add(new Text("Please enter the physician's assistant password: ")); dialogVbox.getChildren().add(textField); dialogVbox.getChildren().add(submit); dialogVbox.getChildren().add(cancel); dialogVbox.getChildren().add(label); Scene dialogScene = new Scene(dialogVbox, 300, 200); dialog.setScene(dialogScene); dialog.setTitle("Security/Physician's Assistant Authentication"); dialog.show(); submit.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent anEvent) { String password = textField.getText(); if (password.equalsIgnoreCase("siberianplatypus")) { partnerSigned = true; dialog.close(); assistantsign.setVisible(false); saveButton.setDisable(true); //signature.setText("This document has been digitally signed by David Zhvikov MD"); //signature.setVisible(true); //signature2.setVisible(true); assistantsignature.setVisible(true); //update the "signed" status document here, checked the "signed" status in the initialize() method and enable/disable the buttons and message accordingly onLoad...when the signed document is first created, it should be set to false (f) by default try { File signedStatus = new File(installationPath + "/userdata/" + firstName.toLowerCase() + lastName.toLowerCase() + dob + "/EvaluationForm/assistantsigned.txt"); FileWriter writ = new FileWriter(signedStatus, false); //it is set to false so that it (the current patient) will be overwritten every time BufferedWriter bw = new BufferedWriter(writ); writ.append("true"); bw.close(); writ.close(); } catch (IOException e) { } ap.setDisable(true); //System.out.println(engaged.isSelected()); } else { label.setText("The password you entered is incorrect. Please try again."); } //adds files to file tracker } }); cancel.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent anEvent) { dialog.close(); //close the window here } }); }
From source file:patientmanagerv1.HomeController.java
public void signEvaluation() { final Stage dialog = new Stage(); dialog.initModality(Modality.APPLICATION_MODAL); final TextField textField = new TextField(); Button submit = new Button(); Button cancel = new Button(); final Label label = new Label(); cancel.setText("Cancel"); cancel.setAlignment(Pos.CENTER);//from w w w. j av a2s . co m submit.setText("Submit"); submit.setAlignment(Pos.BOTTOM_RIGHT); final VBox dialogVbox = new VBox(20); dialogVbox.getChildren() .add(new Text("Only the physician can sign this document. Please enter the master password: ")); dialogVbox.getChildren().add(textField); dialogVbox.getChildren().add(submit); dialogVbox.getChildren().add(cancel); dialogVbox.getChildren().add(label); Scene dialogScene = new Scene(dialogVbox, 300, 200); dialog.setScene(dialogScene); dialog.setTitle("Security/Physician Authentication"); dialog.show(); submit.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent anEvent) { String password = textField.getText(); if (password.equalsIgnoreCase("protooncogene")) { dccSigned = true; dialog.close(); sign.setVisible(false); saveButton.setDisable(true); signature.setText("This document has been digitally signed by David Zhvikov MD"); signature.setVisible(true); signature2.setVisible(true); //update the "signed" status document here, checked the "signed" status in the initialize() method and enable/disable the buttons and message accordingly onLoad...when the signed document is first created, it should be set to false (f) by default try { File signedStatus = new File(installationPath + "/userdata/" + firstName.toLowerCase() + lastName.toLowerCase() + dob + "/EvaluationForm/signed.txt"); FileWriter writ = new FileWriter(signedStatus, false); //it is set to false so that it (the current patient) will be overwritten every time BufferedWriter bw = new BufferedWriter(writ); writ.append("true"); bw.close(); writ.close(); } catch (IOException e) { } ap.setDisable(true); //System.out.println(engaged.isSelected()); } else { label.setText("The password you entered is incorrect. Please try again."); } //adds files to file tracker } }); cancel.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent anEvent) { dialog.close(); //close the window here } }); //"save as document" (exporting) should become enabled after signing? (ask dcc if he wants this) --> it should automatically convert the generated word document to a pdf }
From source file:patientmanagerv1.HomeController.java
public void printAdv() { final Stage dialog = new Stage(); dialog.initModality(Modality.APPLICATION_MODAL); final TextField textField = new TextField(); Button submit = new Button(); Button cancel = new Button(); final Label label = new Label(); cancel.setText("Cancel"); cancel.setAlignment(Pos.CENTER);/*ww w. j av a 2 s.co m*/ submit.setText("Submit"); submit.setAlignment(Pos.BOTTOM_RIGHT); final VBox dialogVbox = new VBox(20); dialogVbox.getChildren().add(new Text("Enter the master password: ")); dialogVbox.getChildren().add(textField); dialogVbox.getChildren().add(submit); dialogVbox.getChildren().add(cancel); dialogVbox.getChildren().add(label); Scene dialogScene = new Scene(dialogVbox, 300, 200); dialog.setScene(dialogScene); dialog.setTitle("Security/Physician Authentication"); dialog.show(); submit.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent anEvent) { String password = textField.getText(); if (password.equalsIgnoreCase("protooncogene")) { dialog.close(); writeEvalToDocX(false, ""); //OPENS the document for printing: try { if (Desktop.isDesktopSupported()) { Desktop.getDesktop() .open(new File(installationPath + "/userdata/" + firstName + lastName + dob + "/" + firstName + lastName + dob + "psychiatricevaluation.docx")); } } catch (IOException ioe) { ioe.printStackTrace(); } } else { label.setText("The password you entered is incorrect. Please try again."); } //adds files to file tracker } }); cancel.setOnAction(new EventHandler<ActionEvent>() { public void handle(ActionEvent anEvent) { dialog.close(); //close the window here } }); }