+
+ //////////////////////////////////
+ ///StructureListener
+ public String getPdbFile()
+ {
+ return pdbentry.getFile();
+ }
+
+
+ String lastMessage;
+ public void mouseOverStructure(int pdbResNum, String chain)
+ {
+ if (lastMessage == null || !lastMessage.equals(pdbResNum+chain))
+ ssm.mouseOverStructure(pdbResNum, chain, pdbentry.getFile());
+
+ lastMessage = pdbResNum+chain;
+ }
+
+ StringBuffer resetLastRes = new StringBuffer();
+ StringBuffer eval = new StringBuffer();
+
+ public void highlightAtom(int atomIndex, int pdbResNum, String chain, String pdbfile)
+ {
+ if (!seqColoursReady)
+ {
+ return;
+ }
+
+ if (highlightRes != null
+ && highlightRes.contains( (atomIndex - 1) + ""))
+ {
+ return;
+ }
+
+ int index = -1;
+ Bond tmpBond;
+ for (index = 0; index < mainchain.bonds.size(); index++)
+ {
+ tmpBond = (Bond) mainchain.bonds.elementAt(index);
+ if (tmpBond.at1.atomIndex == atomIndex)
+ {
+ if (highlightBond1 != null)
+ {
+ highlightBond1.at2.isSelected = false;
+ }
+
+ if (highlightBond2 != null)
+ {
+ highlightBond2.at1.isSelected = false;
+ }
+
+ highlightBond1 = null;
+ highlightBond2 = null;
+
+ if (index > 0)
+ {
+ highlightBond1 = (Bond) mainchain.bonds.elementAt(index - 1);
+ highlightBond1.at2.isSelected = true;
+ }
+
+ if (index != mainchain.bonds.size())
+ {
+ highlightBond2 = (Bond) mainchain.bonds.elementAt(index);
+ highlightBond2.at1.isSelected = true;
+ }
+
+ break;
+ }
+ }
+
+ redrawneeded = true;
+ repaint();
+ }
+
+
+ public Color getColour(int atomIndex, int pdbResNum, String chain, String pdbfile)
+ {
+ return Color.white;
+ // if (!pdbfile.equals(pdbentry.getFile()))
+ // return null;
+
+ //return new Color(viewer.getAtomArgb(atomIndex));
+ }
+
+ public void updateColours(Object source)
+ {
+ colourBySequence();
+ redrawneeded = true;
+ repaint();
+ }
+