From d1055a6dd6cc9d065e9e589eae260c16cb941265 Mon Sep 17 00:00:00 2001 From: amwaterhouse Date: Wed, 6 Apr 2005 17:14:39 +0000 Subject: [PATCH] dont draw first block if colour is null --- src/jalview/gui/SequenceRenderer.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index 442239d..cf7db6c 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -46,18 +46,18 @@ public class SequenceRenderer implements RendererI graphics = g; - drawBoxes(seq, start, end, x1, y1, (int) width, height, pid); + drawBoxes(seq, start, end, x1, y1, (int) width, height); fm = g.getFontMetrics(); drawText(seq,start,end,x1,y1,(int)width,height); } - public void drawBoxes(SequenceI seq,int start, int end, int x1, int y1, int width, int height,Vector freq) { + public void drawBoxes(SequenceI seq,int start, int end, int x1, int y1, int width, int height) { int i = start; int length = seq.getLength(); - int curStart = x1; + int curStart = -1; int curWidth = width; Color tempColour = null; @@ -76,7 +76,8 @@ public class SequenceRenderer implements RendererI if (resBoxColour != tempColour) { - graphics.fillRect(x1+width*(curStart-start),y1,curWidth,height); + if(tempColour!=null) + graphics.fillRect(x1+width*(curStart-start),y1,curWidth,height); graphics.setColor(resBoxColour); curStart = i; @@ -89,7 +90,9 @@ public class SequenceRenderer implements RendererI i++; } - graphics.fillRect(x1+width*(curStart-start),y1,curWidth,height); + + + graphics.fillRect(x1+width*(curStart-start),y1,curWidth,height); } public void drawText(SequenceI seq,int start, int end, int x1, int y1, int width, int height) -- 1.7.10.2