/** Get our target directory */ @Override public void pullExtraValues(Map<String, Object> extras) { setDocumentRelativeDirectory((String) extras.get("relative-document-root")); document = (GedDocument) extras.get("ged-document"); logger.info("ged-document : " + (document == null ? "null" : "not null")); docInfoEditor.getEventHandler().setDocument(document); documentPreviewer.getEventHandler().setDocument(document); if (extras.containsKey("system-file")) { documentPreviewer.addFile((File) extras.get("system-file")); logger.info("system-file : " + ((File) extras.get("system-file")).getAbsolutePath()); } }
private void instanciateWidgets() { eventHandler = new DocumentConfigurationScreenEventHandler(this); btnAddFromFS = new Button(properties.getProperty("add_from_hard_drive")); btnAddFromFS.setPrefSize(300, 80); btnAddFromFS.setOnAction(eventHandler); Image i = new Image(getClass().getResourceAsStream(properties.getProperty("ico_library_root"))); ImageView iv = new ImageView(i); iv.setSmooth(true); iv.setFitWidth(64); iv.setFitHeight(64); btnAddFromFS.setGraphic(iv); btnAddFromScanner = new Button(properties.getProperty("add_scan")); btnAddFromScanner.setPrefSize(300, 80); btnAddFromScanner.setOnAction(eventHandler); Image i2 = new Image(getClass().getResourceAsStream(properties.getProperty("ico_scan"))); ImageView iv2 = new ImageView(i2); iv2.setSmooth(true); iv2.setFitWidth(64); iv2.setFitHeight(64); btnAddFromScanner.setGraphic(iv2); docInfoEditor = new DocumentInfoEditor(); docInfoEditor.getEventHandler().addDocumentInfoEditorListener(eventHandler); btnSubmit = new Button(properties.getProperty("save")); btnSubmit.setPrefSize(250, 80); btnSubmit.setOnAction(eventHandler); Image i3 = new Image(getClass().getResourceAsStream(properties.getProperty("ico_save"))); ImageView iv3 = new ImageView(i3); iv3.setSmooth(true); iv3.setFitWidth(64); iv3.setFitHeight(64); btnSubmit.setGraphic(iv3); btnSubmit.setDisable(true); documentPreviewer = new DocumentPreviewer(this); documentPreviewer.getEventHandler().addDocumentPreviewListener(eventHandler); documentPreviewer.setEditionMode(true); }