public class Node {
private final int idx = master_idx++;
public String label;
+ public String comment;
public boolean directed = false;
public String color="black";
public ArrayList<Node> edges = new ArrayList<Node>();
pw.print("\"");
}
pw.print("color="+color);
+ if (comment!=null) pw.print(" comment=\""+StringUtil.escapify(comment,"\\\"")+"\" ");
pw.print("];\n");
}
}
public boolean isHidden();
}
+ public void show() throws IOException {
+ Runtime.getRuntime().exec(new String[] { "dot", "-Tsvg" });
+ }
+
public void dump(PrintWriter pw) {
IdentityHashMap<Node,Node> done = new IdentityHashMap<Node,Node>();
pw.println("digraph G { rankdir=LR; \n");
}
for(Node n : ihm.values()) n.edges(pw);
pw.println("}\n");
+ pw.flush();
}
}