Get colour from structure added
authoramwaterhouse <Andrew Waterhouse>
Mon, 23 Apr 2007 11:48:54 +0000 (11:48 +0000)
committeramwaterhouse <Andrew Waterhouse>
Mon, 23 Apr 2007 11:48:54 +0000 (11:48 +0000)
src/jalview/gui/AppJMol.java

index da94e4c..e3aa9ea 100644 (file)
@@ -195,8 +195,6 @@ public synchronized void addSequence(SequenceI [] seq)
     jmolpopup = JmolPopup.newJmolPopup(viewer);
 
     viewer.evalStringQuiet(command);
-
-    colourBySequence = true;
   }
 
 
@@ -582,6 +580,14 @@ public synchronized void addSequence(SequenceI [] seq)
 
   }
 
+  public Color getColour(int atomIndex, int pdbResNum, String chain, String pdbfile)
+  {
+    if (!pdbfile.equals(pdbentry.getFile()))
+      return null;
+
+    return new Color(viewer.getAtomArgb(atomIndex));
+  }
+
   public void updateColours(Object source)
   {
     colourBySequence( (AlignmentPanel) source);