Пример #1
0
 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");
   }
 }
Пример #2
0
 public void toDot(StringBuffer str) {
   str.append("e_" + id + " [");
   str.append("shape=\"ellipse\", label=\"" + toString());
   str.append("\"];\n");
 }