contents.append("<br>Maximum Sequence Length: "+max);
contents.append("<br>Average Length: "+(int)avg);
- if (((Alignment)viewport.alignment).alignmentProperties != null)
+ if (((Alignment)viewport.alignment).getProperties() != null)
{
- Hashtable props = ((Alignment)viewport.alignment).alignmentProperties;
+ Hashtable props = ((Alignment)viewport.alignment).getProperties();
Enumeration en = props.keys();
contents.append("<br><br><table border=\"1\">");
while(en.hasMoreElements())
{
String key = en.nextElement().toString();
- contents.append("<tr><td>"+key+"</td><td>"+props.get(key)+"</td></tr>");
+ StringBuffer val = new StringBuffer();
+ String vals = props.get(key).toString();
+ int pos=0, npos;
+ do {
+ npos = vals.indexOf("\n",pos);
+ if (npos==-1)
+ {
+ val.append(vals.substring(pos));
+ } else {
+ val.append(vals.substring(pos, npos));
+ val.append("<br>");
+ }
+ pos = npos+1;
+ } while (npos!=-1);
+ contents.append("<tr><td>"+key+"</td><td>"+val+"</td></tr>");
}
contents.append("</table>");
}
editPane.setText(contents.toString()+"</html>");
JInternalFrame frame = new JInternalFrame();
frame.getContentPane().add(editPane);
-
Desktop.instance.addInternalFrame(frame,"Alignment Properties: "+getTitle(),500,400);
}