public String getPS() { // generate the edges and boxes (with text) generateEdges(getTree().getRoot()); for (Tree node : treeLayout.getNodeBounds().keySet()) { generateNode(node); } Dimension size = treeLayout.getBounds().getBounds().getSize(); doc.boundingBox(size.width, size.height); doc.close(); return doc.getPS(); }
public String getPS() { // generate the edges and boxes (with text) generateEdges(getTree().getRoot()); for (Tree node : treeLayout.getNodeBounds().keySet()) { generateNode(node); } Dimension size = treeLayout.getBounds().getBounds().getSize(); doc.boundingBox(size.width, size.height); doc.close(); return doc.getPS(); }
public String getPS() { // generate the edges and boxes (with text) generateEdges(getTree().getRoot()); for (Tree node : treeLayout.getNodeBounds().keySet()) { generateNode(node); } Dimension size = treeLayout.getBounds().getBounds().getSize(); doc.boundingBox(size.width, size.height); doc.close(); return doc.getPS(); }
public String getPS() { // generate the edges and boxes (with text) generateEdges(getTree().getRoot()); for (Tree node : treeLayout.getNodeBounds().keySet()) { generateNode(node); } Dimension size = treeLayout.getBounds().getBounds().getSize(); doc.boundingBox(size.width, size.height); doc.close(); return doc.getPS(); }
protected void generateEdges(Tree parent) { if (!getTree().isLeaf(parent)) { Rectangle2D.Double parentBounds = getBoundsOfNode(parent); // System.out.println("%% parent("+getText(parent)+")="+parentBounds); double x1 = parentBounds.getCenterX(); double y1 = parentBounds.y; for (Tree child : getChildren(parent)) { Rectangle2D.Double childBounds = getBoundsOfNode(child); // System.out.println("%% child("+getText(child)+")="+childBounds); double x2 = childBounds.getCenterX(); double y2 = childBounds.getMaxY(); doc.line(x1, y1, x2, y2); generateEdges(child); } } }
protected void generateEdges(Tree parent) { if (!getTree().isLeaf(parent)) { Rectangle2D.Double parentBounds = getBoundsOfNode(parent); // System.out.println("%% parent("+getText(parent)+")="+parentBounds); double x1 = parentBounds.getCenterX(); double y1 = parentBounds.y; for (Tree child : getChildren(parent)) { Rectangle2D.Double childBounds = getBoundsOfNode(child); // System.out.println("%% child("+getText(child)+")="+childBounds); double x2 = childBounds.getCenterX(); double y2 = childBounds.getMaxY(); doc.line(x1, y1, x2, y2); generateEdges(child); } } }
protected void generateEdges(Tree parent) { if (!getTree().isLeaf(parent)) { Rectangle2D.Double parentBounds = getBoundsOfNode(parent); // System.out.println("%% parent("+getText(parent)+")="+parentBounds); double x1 = parentBounds.getCenterX(); double y1 = parentBounds.y; for (Tree child : getChildren(parent)) { Rectangle2D.Double childBounds = getBoundsOfNode(child); // System.out.println("%% child("+getText(child)+")="+childBounds); double x2 = childBounds.getCenterX(); double y2 = childBounds.getMaxY(); doc.line(x1, y1, x2, y2); generateEdges(child); } } }
protected void generateEdges(Tree parent) { if (!getTree().isLeaf(parent)) { Rectangle2D.Double parentBounds = getBoundsOfNode(parent); // System.out.println("%% parent("+getText(parent)+")="+parentBounds); double x1 = parentBounds.getCenterX(); double y1 = parentBounds.y; for (Tree child : getChildren(parent)) { Rectangle2D.Double childBounds = getBoundsOfNode(child); // System.out.println("%% child("+getText(child)+")="+childBounds); double x2 = childBounds.getCenterX(); double y2 = childBounds.getMaxY(); doc.line(x1, y1, x2, y2); generateEdges(child); } } }