Bond highlightBond1, highlightBond2;\r
boolean errorLoading = false;\r
boolean seqColoursReady = false;\r
+ jalview.appletgui.FeatureRenderer fr;\r
\r
public AppletPDBCanvas(jalview.appletgui.SeqCanvas seqcanvas, Sequence seq)\r
{\r
// Applet and Application specific sequence renderers to be used\r
void colourBySequence(PDBChain chain)\r
{\r
+ boolean showFeatures = false;\r
+\r
+ if(seqcanvas.getViewport().getShowSequenceFeatures())\r
+ {\r
+ if(fr==null)\r
+ {\r
+ fr = new jalview.appletgui.FeatureRenderer(seqcanvas.getViewport());\r
+ }\r
+ fr.transferSettings( seqcanvas.getFeatureRenderer());\r
+ showFeatures = true;\r
+ }\r
+\r
for (int i = 0; i < chain.bonds.size(); i++)\r
{\r
Bond tmp = (Bond) chain.bonds.elementAt(i);\r
tmp.startCol = seqcanvas.getSequenceRenderer().\r
getResidueBoxColour( sequence, index);\r
\r
- tmp.startCol = seqcanvas.getFeatureRenderer().\r
- findFeatureColour(tmp.startCol, sequence, index);\r
+ if(showFeatures)\r
+ tmp.startCol = fr.findFeatureColour(tmp.startCol, sequence, index);\r
}\r
}\r
\r
{\r
tmp.endCol = seqcanvas.getSequenceRenderer().\r
getResidueBoxColour( sequence, index);\r
- tmp.endCol = seqcanvas.getFeatureRenderer().\r
- findFeatureColour(tmp.endCol, sequence, index);\r
+\r
+ if(showFeatures)\r
+ tmp.endCol = fr.findFeatureColour(tmp.endCol, sequence, index);\r
}\r
}\r
}\r