public void toGraph(Object context, Graph g) { if (context instanceof AADD) { // Node level cache g.addNodeLabel("#" + _nLocalID, "x" + _nGlobalID /* + " : #" + _nLocalID*/); if (DD.USE_COLOR) { if (DD.USE_FESTIVE) g.addNodeColor("#" + _nLocalID, "green"); // green, lightblue else g.addNodeColor("#" + _nLocalID, "lightblue"); // green, lightblue } g.addNodeShape("#" + _nLocalID, "ellipse"); g.addNodeStyle("#" + _nLocalID, "filled"); ADDNode n1 = ((AADD) context).getNode(_nHigh); if (n1 != null) { g.addUniLink( "#" + _nLocalID, "#" + _nHigh, "black", "solid", "<" + _df.format(_dHighOffset) + " + " + _df.format(_dHighMult) + " * >"); n1.toGraph(((AADD) context), g); g.addUniLink( "#" + _nLocalID, "#" + _nLow, "black", "dashed", "<" + _df.format(_dLowOffset) + " + " + _df.format(_dLowMult) + " * >"); if (_nHigh != _nLow) { ADDNode n2 = ((AADD) context).getNode(_nLow); if (n2 != null) n2.toGraph(((AADD) context), g); } } } else { System.out.println("[ ERROR GENERATING GRAPH: " + context.getClass() + " ] "); } }