import java.util.BitSet;
import java.util.HashMap;
import java.util.Hashtable;
+import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
setColor(groups.get(i), col.brighter());
Vector<BinaryNode> l = tree.findLeaves(groups.get(i));
+ gatherLabelsTo(groups.get(i),l);
if (!tp.isColumnWise())
{
- createSeqGroupFor(aps, l, col);
+ createSeqGroupFor(aps, l, col);
}
else
{
}
}
+ private void gatherLabelsTo(BinaryNode binaryNode, Vector<BinaryNode> l)
+ {
+ LinkedHashSet<String> labelsForNode = new LinkedHashSet<String>();
+ for (BinaryNode leaf:l)
+ {
+ if (leaf.hasLabel())
+ {
+ labelsForNode.add(leaf.getLabel());
+ }
+ }
+ StringBuilder sb = new StringBuilder();
+ boolean first=true;
+ for (String label:labelsForNode)
+ {
+ if (!first) {
+ sb.append(" | ");
+ }
+ first=false;
+ sb.append(label);
+ }
+ binaryNode.setLabel(sb.toString());
+ }
+
private int parseColumnNode(BinaryNode bn) throws NumberFormatException
{
return Integer.parseInt(