}
return info;
}
private Hashtable getInfo(int index) {
Measurement m = (Measurement) measurements.get(index);
int count = m.getCount();
Hashtable info = new Hashtable();
info.put("index", new Integer(index));
info.put("type", (count == 2 ? "distance" : count == 3 ? "angle"
: "dihedral"));
info.put("strMeasurement", m.getString());
info.put("count", new Integer(count));
info.put("value", new Float(m.getValue()));
TickInfo tickInfo = m.getTickInfo();
if (tickInfo != null) {
info.put("ticks", tickInfo.ticks);
if (tickInfo.scale != null)
info.put("tickScale", tickInfo.scale);
if (tickInfo.tickLabelFormats != null)
info.put("tickLabelFormats", tickInfo.tickLabelFormats);
if (!Float.isNaN(tickInfo.first))
info.put("tickStart", new Float(tickInfo.first));
}
List atomsInfo = new ArrayList();
for (int i = 1; i <= count; i++) {
Hashtable atomInfo = new Hashtable();
int atomIndex = m.getAtomIndex(i);
atomInfo.put("_ipt", new Integer(atomIndex));
atomInfo.put("coord", Escape.escape(m.getAtom(i)));
atomInfo.put("atomno", new Integer(atomIndex < 0 ? -1 : atoms[atomIndex].getAtomNumber()));
atomInfo.put("info", (atomIndex < 0 ? "<point>" : atoms[atomIndex].getInfo()));
atomsInfo.add(atomInfo);
}
info.put("atoms", atomsInfo);