From: amwaterhouse Date: Fri, 24 Feb 2006 11:46:41 +0000 (+0000) Subject: Features now array X-Git-Tag: Root_VamJalview_2_07b+~91 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=91d8c718e1e9d4f67e8840cfe402b46f79858d57;p=jalview.git Features now array --- diff --git a/src/jalview/gui/AlignmentPanel.java b/src/jalview/gui/AlignmentPanel.java index f81e471..0acf425 100755 --- a/src/jalview/gui/AlignmentPanel.java +++ b/src/jalview/gui/AlignmentPanel.java @@ -708,8 +708,7 @@ public class AlignmentPanel extends GAlignmentPanel // draw main sequence panel pg.translate(idWidth, 0); - seqPanel.seqCanvas.drawPanel(pg, startRes, endRes, startSeq, endSeq, - startRes, startSeq, 0); + seqPanel.seqCanvas.drawPanel(pg, startRes, endRes, startSeq, endSeq, 0); if (av.showAnnotation && (endSeq == av.alignment.getHeight())) { @@ -940,7 +939,7 @@ public class AlignmentPanel extends GAlignmentPanel sy = s * av.charHeight + scaleHeight; SequenceI seq = av.alignment.getSequenceAt(s); - java.util.Vector features = seq.getDatasetSequence().getSequenceFeatures(); + SequenceFeature [] features = seq.getDatasetSequence().getSequenceFeatures(); SequenceGroup[] groups = av.alignment.findAllGroups(seq); for(res =0; res= seq.findPosition(res))) + if ( (features[f].getBegin() <= seq.findPosition(res)) && + (features[f].getEnd() >= seq.findPosition(res))) { - if (sf.getType().equals("disulfide bond")) + if (features[f].getType().equals("disulfide bond")) { - if (sf.getBegin() == seq.findPosition(res) - || sf.getEnd() == seq.findPosition(res)) + if (features[f].getBegin() == seq.findPosition(res) + || features[f].getEnd() == seq.findPosition(res)) { - text.append("
disulfide bond " + sf.getBegin() + ":" + - sf.getEnd()); + text.append("
disulfide bond " + features[f].getBegin() + ":" + + features[f].getEnd()); } } else { text.append("
"); - text.append(sf.getType()); - if (sf.getDescription() != null && !sf.getType().equals(sf.getDescription())) - text.append(" " + sf.getDescription()); + text.append(features[f].getType()); + if (features[f].getDescription() != null && !features[f].getType().equals(features[f].getDescription())) + text.append(" " + features[f].getDescription()); - if (sf.getStatus() != null && sf.getStatus().length()>0) + if (features[f].getStatus() != null && features[f].getStatus().length()>0) { - text.append(" (" + sf.getStatus() + ")"); + text.append(" (" + features[f].getStatus() + ")"); } } }