+ public String name() { return cluster?("cluster_"+idx):("subgraph_"+idx); }
+ public boolean simple() { return false; }
+ public void dump(PrintWriter pw, IdentityHashMap<Node,Node> done) {
+ Group g = this;
+ if (done.get(g)!=null) return;
+ done.put(g,g);
+ pw.println(" subgraph "+name()+" { rank=same;\n");
+ pw.println(" label=\""+StringUtil.escapify(label.toString(), "\\\"\r\n")+"\";\n");
+ pw.println(" color="+g.color+";\n");
+ pw.println(" shape="+g.shape+";\n");
+ for(Node n : groups.keySet())
+ if (groups.get(n)==g)
+ n.dump(pw, done);
+ pw.println(" }\n");
+ }