From 5b62ff2899b8263a89d41086195bdeea1ba96b3b Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Fri, 14 Jan 2005 15:46:32 +0000 Subject: [PATCH] Dispalys rule along top of output --- src/jalview/io/HTMLOutput.java | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) 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); -- 1.7.10.2