public void toDot(String file) { try { BufferedWriter out = new BufferedWriter(new FileWriter(file)); out.write("digraph Stree {\n"); StringBuffer str = new StringBuffer(); toDot(str); out.write(str.toString()); out.write("}\n"); out.close(); } catch (IOException e) { System.err.println("ERROR: build dot"); } }
public void toDot(StringBuffer str) { str.append("e_" + id + " ["); str.append("shape=\"ellipse\", label=\"" + toString()); str.append("\"];\n"); }