* draw scale value, justified, with half a character width
* separation from the sequence data
*/
- int justify = fm.stringWidth(String.valueOf(value)) + charWidth;
+ String valueAsString = String.valueOf(value);
+ int justify = fm.stringWidth(valueAsString) + charWidth;
int xpos = left ? labelWidthWest - justify + charWidth / 2
: getWidth() - justify - charWidth / 2;
- g.drawString(String.valueOf(value), xpos, (ypos + (i * charHeight))
- - (charHeight / 5));
+ g.setColor(Color.white);
+ int y = (ypos + (i * charHeight)) - (charHeight / 5);
+ g.fillRect(xpos, y, justify, charHeight);
+ g.setColor(Color.black);
+ g.drawString(valueAsString, xpos, y);
}
}
}
*/
protected void fastPaintWrapped(int scrollX)
{
- if (Math.abs(scrollX) > 0 /*av.getRanges().getViewportWidth()*/)
+ if (Math.abs(scrollX) > av.getRanges().getViewportWidth())
{
/*
* shift of more than one view width is too much
if (av.getScaleLeftWrapped())
{
- // drawVerticalScale(gg, xpos, xpos + viewportWidth, y, true);
+ drawVerticalScale(gg, xpos, xpos + viewportWidth, y, true);
}
if (av.getScaleRightWrapped())
{
- // drawVerticalScale(gg, xpos, xpos + viewportWidth, y, false);
+ drawVerticalScale(gg, xpos, xpos + viewportWidth, y, false);
}
y += repeatHeight;