public void drawDomainMarker(final GC gc, final CategoryPlot plot,
final CategoryAxis axis, final CategoryMarker marker,
final Rectangle dataArea) {
final Comparable category = marker.getKey();
final CategoryDataset dataset = plot.getDataset(plot.getIndexOf(this));
final int columnIndex = dataset.getColumnIndex(category);
if (columnIndex < 0) {
return;
}
final int oldAlpha = gc.getAlpha();
// transparency
gc.setAlpha(marker.getAlpha());
final PlotOrientation orientation = plot.getOrientation();
Rectangle bounds = null;
if (marker.getDrawAsLine()) {
final double v = axis.getCategoryMiddle(columnIndex, dataset
.getColumnCount(), dataArea, plot.getDomainAxisEdge());
Line line = null;
if (orientation == PlotOrientation.HORIZONTAL) {
line = Line.Double(RectangleUtil.getMinX(dataArea), v,
RectangleUtil.getMaxX(dataArea), v);
} else if (orientation == PlotOrientation.VERTICAL) {
line = Line.Double(v, RectangleUtil.getMinY(dataArea), v,
RectangleUtil.getMaxY(dataArea));
}
gc.setForeground(marker.getPaint());
marker.getStroke().set(gc);
GCUtilities.draw(gc, line);
bounds = line.getBounds();
} else {
final double v0 = axis.getCategoryStart(columnIndex, dataset
.getColumnCount(), dataArea, plot.getDomainAxisEdge());
final double v1 = axis.getCategoryEnd(columnIndex, dataset
.getColumnCount(), dataArea, plot.getDomainAxisEdge());
Rectangle area = null;
if (orientation == PlotOrientation.HORIZONTAL) {
area = RectangleUtil.Double(RectangleUtil.getMinX(dataArea),
v0, dataArea.width, (v1 - v0));