* Draw the scale to the left or right of a wrapped alignment
*
* @param g
+ * graphics context, positioned at the start of the scale to be drawn
* @param startx
* first column of wrapped width (0.. excluding any hidden columns)
* @param endx
g.setColor(Color.white);
int y = (ypos + (i * charHeight)) - (charHeight / 5);
y -= charHeight; // fillRect: origin is top left of rectangle
- int xpos = left ? 0 : labelWidthWest + charWidth
- * av.getRanges().getViewportWidth();
- g.fillRect(xpos, y, left ? labelWidthWest : labelWidthEast,
+ g.fillRect(0, y, left ? labelWidthWest : labelWidthEast,
charHeight + 1);
y += charHeight; // drawString: origin is bottom left of text
*/
String valueAsString = String.valueOf(value);
int justify = fm.stringWidth(valueAsString) + charWidth;
- xpos = left ? labelWidthWest - justify + charWidth / 2
- : getWidth() - justify - charWidth / 2;
-
+ int xpos = left ? labelWidthWest - justify + charWidth / 2
+ : labelWidthEast - justify + charWidth / 2;
g.setColor(Color.black);
g.drawString(valueAsString, xpos, y);
}
if (av.getScaleRightWrapped())
{
+ int x = labelWidthWest + viewportWidth * charWidth;
+ g.translate(x, 0);
drawVerticalScale(g, startColumn, endColumn, ypos, false);
+ g.translate(-x, 0);
}
/*
xMiddle + charHeight / 4, xMiddle };
int yTop = ypos - (charHeight / 2);
int[] yPoints = new int[] { yTop, yTop, yTop + 8 };
- gg.fillPolygon(xPoints, yPoints, 3);
+ g.fillPolygon(xPoints, yPoints, 3);
}
}