Paint gridPaint = null;
boolean paintLine = false;
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
paintLine = false;
ValueTick tick = (ValueTick) iterator.next();
if ((tick.getTickType() == TickType.MINOR)
&& isRangeMinorGridlinesVisible()) {
gridStroke = getRangeMinorGridlineStroke();
gridPaint = getRangeMinorGridlinePaint();
paintLine = true;
}
else if ((tick.getTickType() == TickType.MAJOR)
&& isRangeGridlinesVisible()) {
gridStroke = getRangeGridlineStroke();
gridPaint = getRangeGridlinePaint();
paintLine = true;
}
if (((tick.getValue() != 0.0)
|| !isRangeZeroBaselineVisible()) && paintLine) {
// the method we want isn't in the CategoryItemRenderer
// interface...
if (r instanceof AbstractCategoryItemRenderer) {
AbstractCategoryItemRenderer aci
= (AbstractCategoryItemRenderer) r;
aci.drawRangeLine(g2, this, axis, dataArea,
tick.getValue(), gridPaint, gridStroke);
}
else {
// we'll have to use the method in the interface, but
// this doesn't have the paint and stroke settings...
r.drawRangeGridline(g2, this, axis, dataArea,
tick.getValue());
}
}
}
}