From: amwaterhouse Date: Fri, 14 Jan 2005 15:46:32 +0000 (+0000) Subject: Dispalys rule along top of output X-Git-Tag: Release_2_0~766 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5b62ff2899b8263a89d41086195bdeea1ba96b3b;p=jalview.git Dispalys rule along top of output --- diff --git a/src/jalview/io/HTMLOutput.java b/src/jalview/io/HTMLOutput.java index af6e255..d15a6e8 100755 --- a/src/jalview/io/HTMLOutput.java +++ b/src/jalview/io/HTMLOutput.java @@ -50,22 +50,41 @@ public class HTMLOutput ////////////// - SequenceGroup group; + SequenceGroup [] groups; SequenceI seq; - ColourSchemeI cs; + ColourSchemeI cs = null; AlignmentI alignment = av.getAlignment(); String r,g,b; - for (int i = 0; i < alignment.getHeight(); i++) + + // draws the top row, the measure rule + out.println(""); + int i=0; + for(i=10; i"+i+"
|"); + + out.println(""+i+"
|"); + out.println(""); + + for (i = 0; i < alignment.getHeight(); i++) { seq = alignment.getSequenceAt(i); - group = alignment.findGroup( seq ); + groups = alignment.findAllGroups( seq ); out.println(""+seq.getDisplayId()+"  "); + + for (int res = 0; res < seq.getLength(); res++) { - if(group!=null && group.getStartRes()<=res && group.getEndRes()>=res) - cs = group.cs; - else - cs = av.getGlobalColourScheme(); + cs = av.getGlobalColourScheme(); + + if(groups!=null) + { + for (int k = 0; k < groups.length; k++) + if (groups[k].getStartRes() <= res && groups[k].getEndRes() >= res) + { + cs = groups[k].cs; + break; + } + } color = sr.getResidueBoxColour(cs, seq, res);