From: amwaterhouse Date: Wed, 6 Apr 2005 17:14:39 +0000 (+0000) Subject: dont draw first block if colour is null X-Git-Tag: Release_2_0~481 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d1055a6dd6cc9d065e9e589eae260c16cb941265;p=jalview.git dont draw first block if colour is null --- 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)