本文整理匯總了Java中org.jfree.chart.renderer.category.CategoryItemRenderer.drawRangeGridline方法的典型用法代碼示例。如果您正苦於以下問題:Java CategoryItemRenderer.drawRangeGridline方法的具體用法?Java CategoryItemRenderer.drawRangeGridline怎麽用?Java CategoryItemRenderer.drawRangeGridline使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jfree.chart.renderer.category.CategoryItemRenderer
的用法示例。
在下文中一共展示了CategoryItemRenderer.drawRangeGridline方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: drawRangeGridlines
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
/**
* Draws the gridlines for the plot.
*
* @param g2 the graphics device.
* @param dataArea the area inside the axes.
* @param ticks the ticks.
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {
// draw the range grid lines, if any...
if (isRangeGridlinesVisible()) {
Stroke gridStroke = getRangeGridlineStroke();
Paint gridPaint = getRangeGridlinePaint();
if ((gridStroke != null) && (gridPaint != null)) {
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
CategoryItemRenderer renderer1 = getRenderer();
if (renderer1 != null) {
renderer1.drawRangeGridline(
g2, this, getRangeAxis(), dataArea, tick.getValue()
);
}
}
}
}
}
}
示例2: drawRangeGridlines
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
/**
* Draws the gridlines for the plot.
*
* @param g2 the graphics device.
* @param dataArea the area inside the axes.
* @param ticks the ticks.
*
* @see #drawDomainGridlines(Graphics2D, Rectangle2D)
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
// draw the range grid lines, if any...
if (isRangeGridlinesVisible()) {
Stroke gridStroke = getRangeGridlineStroke();
Paint gridPaint = getRangeGridlinePaint();
if ((gridStroke != null) && (gridPaint != null)) {
ValueAxis axis = getRangeAxis();
if (axis != null) {
Iterator iterator = ticks.iterator();
while (iterator.hasNext()) {
ValueTick tick = (ValueTick) iterator.next();
CategoryItemRenderer renderer1 = getRenderer();
if (renderer1 != null) {
renderer1.drawRangeGridline(g2, this,
getRangeAxis(), dataArea, tick.getValue());
}
}
}
}
}
}
示例3: drawZeroRangeBaseline
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
/**
* Draws a base line across the chart at value zero on the range axis.
*
* @param g2 the graphics device.
* @param area the data area.
*
* @see #setRangeZeroBaselineVisible(boolean)
*
* @since 1.0.13
*/
protected void drawZeroRangeBaseline(Graphics2D g2, Rectangle2D area) {
if (!isRangeZeroBaselineVisible()) {
return;
}
CategoryItemRenderer r = getRenderer();
if (r instanceof AbstractCategoryItemRenderer) {
AbstractCategoryItemRenderer aci = (AbstractCategoryItemRenderer) r;
aci.drawRangeLine(g2, this, getRangeAxis(), area, 0.0,
this.rangeZeroBaselinePaint, this.rangeZeroBaselineStroke);
}
else {
r.drawRangeGridline(g2, this, getRangeAxis(), area, 0.0);
}
}
示例4: drawRangeGridlines
import org.jfree.chart.renderer.category.CategoryItemRenderer; //導入方法依賴的package包/類
/**
* Draws the range gridlines for the plot, if they are visible.
*
* @param g2 the graphics device ({@code null} not permitted).
* @param dataArea the area inside the axes ({@code null} not permitted).
* @param ticks the ticks.
*
* @see #drawDomainGridlines(Graphics2D, Rectangle2D)
*/
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
List ticks) {
// draw the range grid lines, if any...
if (!isRangeGridlinesVisible() && !isRangeMinorGridlinesVisible()) {
return;
}
// no axis, no gridlines...
ValueAxis axis = getRangeAxis();
if (axis == null) {
return;
}
// no renderer, no gridlines...
CategoryItemRenderer r = getRenderer();
if (r == null) {
return;
}
Stroke gridStroke = null;
Paint gridPaint = null;
boolean paintLine;
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());
}
}
}
}