X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fjalview%2Fgui%2FSequenceRenderer.java;h=cf7db6c302f14dd2200535466b7bb78dd044d2df;hb=8004878db16757b62ee2c35738506bc4509428cf;hp=69db54d3b00590f249de23480df4944af244a9ab;hpb=8220e64aa2718d0f81f39a93df46c3f2265a9fa4;p=jalview.git diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index 69db54d..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) @@ -98,17 +101,19 @@ public class SequenceRenderer implements RendererI int charOffset=0; char s; // Need to find the sequence position here. + + graphics.setColor(Color.black); + String sequence = seq.getSequence(); for (int i = start; i <= end; i++) { - if(i