From bdb9169fe2d203d921a111dc683d7daf7b887c25 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Mon, 23 Apr 2007 12:47:53 +0000 Subject: [PATCH] getColour method added --- src/MCview/AppletPDBCanvas.java | 10 ++++++++++ src/jalview/appletgui/AppletJmol.java | 8 ++++++++ 2 files changed, 18 insertions(+) diff --git a/src/MCview/AppletPDBCanvas.java b/src/MCview/AppletPDBCanvas.java index 0c7320d..c3ad10e 100755 --- a/src/MCview/AppletPDBCanvas.java +++ b/src/MCview/AppletPDBCanvas.java @@ -1144,6 +1144,16 @@ public class AppletPDBCanvas 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) { AlignmentPanel ap = (AlignmentPanel) source; diff --git a/src/jalview/appletgui/AppletJmol.java b/src/jalview/appletgui/AppletJmol.java index b7e67c1..3f3c3dd 100644 --- a/src/jalview/appletgui/AppletJmol.java +++ b/src/jalview/appletgui/AppletJmol.java @@ -461,6 +461,14 @@ public class AppletJmol extends Frame //End StructureListener //////////////////////////// + public Color getColour(int atomIndex, int pdbResNum, String chain, String pdbfile) + { + if (!pdbfile.equals(pdbentry.getFile())) + return null; + + return new Color(viewer.getAtomArgb(atomIndex)); + } + FeatureRenderer fr; public void colourBySequence(AlignmentPanel ap) { -- 1.7.10.2