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); } } }