use of org.apache.pdfbox.debugger.ui.DocumentEntry in project pdfbox by apache.
the class PDFDebugger method initTree.
public void initTree() {
TreeStatus treeStatus = new TreeStatus(document.getDocument().getTrailer());
statusPane.updateTreeStatus(treeStatus);
if (isPageMode) {
File file = new File(currentFilePath);
DocumentEntry documentEntry = new DocumentEntry(document, file.getName());
ZoomMenu.getInstance().resetZoom();
RotationMenu.getInstance().setRotationSelection(RotationMenu.ROTATE_0_DEGREES);
tree.setModel(new PDFTreeModel(documentEntry));
// Root/Pages/Kids/[0] is not always the first page, so use the first row instead:
tree.setSelectionPath(tree.getPathForRow(1));
} else {
tree.setModel(new PDFTreeModel(document));
tree.setSelectionPath(treeStatus.getPathForString("Root"));
}
}
Aggregations