X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fgui%2FSequenceRenderer.java;h=54785ef0e4bbc42237350d9ef5367ecbe4e1147b;hb=00f6edbbdddf16f77142e98e375363675be807fe;hp=5b5a392f5ed445a6de169df6fe24f77421d3d4e6;hpb=e71a5d2b1e0025a8e23eb637f12f6f5665c91feb;p=jalview.git diff --git a/src/jalview/gui/SequenceRenderer.java b/src/jalview/gui/SequenceRenderer.java index 5b5a392..54785ef 100755 --- a/src/jalview/gui/SequenceRenderer.java +++ b/src/jalview/gui/SequenceRenderer.java @@ -35,7 +35,7 @@ public class SequenceRenderer implements RendererI void getBoxColour(ColourSchemeI cs, SequenceI seq, int i) { if (cs != null) - resBoxColour = cs.findColour(seq.getSequence(i, i + 1), i, av.getConsensus(false)); + resBoxColour = cs.findColour(seq.getSequence(i, i + 1), i); else resBoxColour = Color.white; } @@ -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) @@ -131,7 +134,10 @@ public class SequenceRenderer implements RendererI if(av.getColourText()) { getBoxColour(av.getGlobalColourScheme(), seq, i); - graphics.setColor(resBoxColour.darker()); + if(av.getShowBoxes()) + graphics.setColor(resBoxColour.darker()); + else + graphics.setColor(resBoxColour); } }