Esempio n. 1
0
 private void addDocument(NodeBoxDocument doc) {
   doc.setVisible(true);
   doc.requestFocus();
   doc.focusNetworkView();
   doc.setActiveNetwork("/");
   documents.add(doc);
   currentDocument = doc;
 }
Esempio n. 2
0
 public void takeScreenshotOfDocument(String documentFileName) {
   File documentFile = new File(documentFileName);
   File documentDirectory = documentFile.getParentFile();
   String imageName = FileUtils.getBaseName(documentFile.getName()) + ".png";
   File screenshotFile = new File(documentDirectory, imageName);
   NodeBoxDocument doc = NodeBoxDocument.load(documentFile);
   addDocument(doc);
   doc.setVisible(true);
   doc.takeScreenshot(screenshotFile);
   doc.close();
 }