//
@Override
- public List<String> getHetatmNames()
+ public Map<String,String> getHetatmNames()
{
HashMap<String,String> hetlist=new HashMap();
for (int mc=0;mc<jmolViewer.ms.mc; mc++)
hetlist.putAll(hets);
}
}
- return Arrays.asList(hetlist.keySet().toArray(new String[0]));
+ return hetlist;
}
//
////////////////////////////
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
+import java.util.Map;
import java.util.Random;
import java.util.Vector;
chainMenu.add(menuItem);
}
}
- void setHetatmMenuItems(List<String> hetatmNames)
+ void setHetatmMenuItems(Map<String,String> hetatmNames)
{
hetatmMenu.removeAll();
if (hetatmNames == null || hetatmNames.isEmpty())
hetatmMenu.add(noneMenuItem);
hetatmMenu.add(allMenuItem);
- for (String chain : hetatmNames)
+ for (Map.Entry<String, String> chain : hetatmNames.entrySet())
{
- JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(chain, false);
+ JCheckBoxMenuItem menuItem = new JCheckBoxMenuItem(chain.getKey(), false);
+ menuItem.setToolTipText(chain.getValue());
menuItem.addItemListener(new ItemListener()
{
@Override
return 0;
}
- public List<String> getHetatmNames() {
- return Collections.EMPTY_LIST;
+ /**
+ * list the ligands available for display/hiding in the current view
+ * @return HETATM CODE:Molecule name
+ */
+ public Map<String, String> getHetatmNames() {
+ return Collections.EMPTY_MAP;
}
/**
* Generates and executes a command to show the given hetatm types as CPK