Features now array
authoramwaterhouse <Andrew Waterhouse>
Fri, 24 Feb 2006 11:46:41 +0000 (11:46 +0000)
committeramwaterhouse <Andrew Waterhouse>
Fri, 24 Feb 2006 11:46:41 +0000 (11:46 +0000)
src/jalview/gui/AlignmentPanel.java

index f81e471..0acf425 100755 (executable)
@@ -708,8 +708,7 @@ public class AlignmentPanel extends GAlignmentPanel
 \r
     // draw main sequence panel\r
     pg.translate(idWidth, 0);\r
-    seqPanel.seqCanvas.drawPanel(pg, startRes, endRes, startSeq, endSeq,\r
-                                 startRes, startSeq, 0);\r
+    seqPanel.seqCanvas.drawPanel(pg, startRes, endRes, startSeq, endSeq, 0);\r
 \r
     if (av.showAnnotation && (endSeq == av.alignment.getHeight()))\r
     {\r
@@ -940,7 +939,7 @@ public class AlignmentPanel extends GAlignmentPanel
           sy = s * av.charHeight + scaleHeight;\r
 \r
           SequenceI seq = av.alignment.getSequenceAt(s);\r
-          java.util.Vector features = seq.getDatasetSequence().getSequenceFeatures();\r
+          SequenceFeature [] features = seq.getDatasetSequence().getSequenceFeatures();\r
           SequenceGroup[] groups = av.alignment.findAllGroups(seq);\r
           for(res =0; res<alwidth; res++)\r
           {\r
@@ -987,33 +986,32 @@ public class AlignmentPanel extends GAlignmentPanel
                   + " onMouseOver=\"toolTip('"\r
                   + alIndex + " " + triplet );\r
               }\r
-                fSize = features.size();\r
+                fSize = features.length;\r
                 for (f = 0; f < fSize; f++)\r
                 {\r
-                  SequenceFeature sf = (SequenceFeature) features.elementAt(f);\r
 \r
-                  if ( (sf.getBegin() <= seq.findPosition(res)) &&\r
-                      (sf.getEnd() >= seq.findPosition(res)))\r
+                  if ( (features[f].getBegin() <= seq.findPosition(res)) &&\r
+                      (features[f].getEnd() >= seq.findPosition(res)))\r
                   {\r
-                    if (sf.getType().equals("disulfide bond"))\r
+                    if (features[f].getType().equals("disulfide bond"))\r
                     {\r
-                      if (sf.getBegin() == seq.findPosition(res)\r
-                          || sf.getEnd() == seq.findPosition(res))\r
+                      if (features[f].getBegin() == seq.findPosition(res)\r
+                          || features[f].getEnd() == seq.findPosition(res))\r
                       {\r
-                        text.append("<br>disulfide bond " + sf.getBegin() + ":" +\r
-                                       sf.getEnd());\r
+                        text.append("<br>disulfide bond " + features[f].getBegin() + ":" +\r
+                                       features[f].getEnd());\r
                       }\r
                     }\r
                     else\r
                     {\r
                       text.append("<br>");\r
-                      text.append(sf.getType());\r
-                      if (sf.getDescription() != null && !sf.getType().equals(sf.getDescription()))\r
-                        text.append(" " + sf.getDescription());\r
+                      text.append(features[f].getType());\r
+                      if (features[f].getDescription() != null && !features[f].getType().equals(features[f].getDescription()))\r
+                        text.append(" " + features[f].getDescription());\r
 \r
-                      if (sf.getStatus() != null && sf.getStatus().length()>0)\r
+                      if (features[f].getStatus() != null && features[f].getStatus().length()>0)\r
                       {\r
-                        text.append(" (" + sf.getStatus() + ")");\r
+                        text.append(" (" + features[f].getStatus() + ")");\r
                       }\r
                     }\r
                   }\r