protected void generateNode(Tree t) {
		// draw the text on top of the box (possibly multiple lines)
		String[] lines = getText(t).split("\n");
		Rectangle2D.Double box = getBoundsOfNode(t);
		// for debugging, turn this on to see boundingbox of nodes
		//doc.rect(box.x, box.y, box.width, box.height);
		// make error nodes from parse tree red by default
		if ( t instanceof ErrorNode ) {
			doc.highlight(box.x, box.y, box.width, box.height);
		}
		double x = box.x+nodeWidthPadding;
		double y = box.y+nodeHeightPaddingBelow;
		for (int i = 0; i < lines.length; i++) {
			doc.text(lines[i], x, y);
			y += doc.getLineHeight();
		}
	}
Get an adaptor for root that indicates how to walk ANTLR trees.
 Override to change the adapter from the default of {@link TreeLayoutAdaptor}
tool/src/org/antlr/v4/gui/TreePostScriptGenerator.java