res = (x / av.getCharWidth()) + av.getStartRes();\r
}\r
\r
+ if(av.hasHiddenColumns)\r
+ res = av.getColumnSelection().adjustForHiddenColumns(res);\r
+\r
return res;\r
\r
}\r
// use aa to see if the mouse pointer is on a\r
if (av.showSequenceFeatures)\r
{\r
- Vector features = sequence.getDatasetSequence().getSequenceFeatures();\r
+ SequenceFeature [] features = sequence.getDatasetSequence().getSequenceFeatures();\r
if(features!=null)\r
{\r
StringBuffer sbuffer = new StringBuffer("<html>");\r
\r
- for (int i = 0; i < features.size(); i++)\r
+ for (int i = 0; i < features.length; i++)\r
{\r
- SequenceFeature sf = (SequenceFeature) features.elementAt(i);\r
\r
- if ( (sf.getBegin() <= sequence.findPosition(res)) &&\r
- (sf.getEnd() >= sequence.findPosition(res)))\r
+ if ( (features[i].getBegin() <= sequence.findPosition(res)) &&\r
+ (features[i].getEnd() >= sequence.findPosition(res)))\r
{\r
- if (sf.getType().equals("disulfide bond"))\r
+ if(!av.featuresDisplayed.containsKey(features[i].getType()))\r
+ continue;\r
+\r
+\r
+ if (features[i].getType().equals("disulfide bond"))\r
{\r
- if (sf.getBegin() == sequence.findPosition(res)\r
- || sf.getEnd() == sequence.findPosition(res))\r
+ if (features[i].getBegin() == sequence.findPosition(res)\r
+ || features[i].getEnd() == sequence.findPosition(res))\r
{\r
if (sbuffer.length() > 6)\r
sbuffer.append("<br>");\r
- sbuffer.append("disulfide bond " + sf.getBegin() + ":" +\r
- sf.getEnd());\r
+ sbuffer.append("disulfide bond " + features[i].getBegin() + ":" +\r
+ features[i].getEnd());\r
}\r
}\r
else\r
{\r
if (sbuffer.length() > 6)\r
sbuffer.append("<br>");\r
- sbuffer.append(sf.getType());\r
- if (sf.getDescription() != null)\r
- sbuffer.append(" " + sf.getDescription());\r
+ if(features[i].featureGroup!=null)\r
+ sbuffer.append(features[i].featureGroup+";");\r
\r
- if (sf.getStatus() != null)\r
+ sbuffer.append(features[i].getType());\r
+\r
+ if (features[i].getDescription() != null\r
+ && !features[i].description.equals(features[i].getType()))\r
+ sbuffer.append("; " + features[i].getDescription());\r
+\r
+ if (features[i].getStatus() != null && features[i].getStatus().length()>0)\r
{\r
- sbuffer.append(" (" + sf.getStatus() + ")");\r
+ sbuffer.append("; (" + features[i].getStatus() + ")");\r
}\r
}\r
}\r
seqCanvas.repaint();\r
}\r
\r
- /**\r
- * DOCUMENT ME!\r
- *\r
- * @param seqstart DOCUMENT ME!\r
- * @param seqend DOCUMENT ME!\r
- * @param start DOCUMENT ME!\r
- */\r
- public void drawChars(int seqstart, int seqend, int start)\r
- {\r
- seqCanvas.drawPanel(seqCanvas.gg, start, av.getEndRes(), seqstart,\r
- seqend, av.getStartRes(), av.getStartSeq(), 0);\r
- seqCanvas.repaint();\r
- }\r
\r
/**\r
* DOCUMENT ME!\r