org.jfree.chart.axis.TickType Java Examples

The following examples show how to use org.jfree.chart.axis.TickType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: XYPlot.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            } else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #2
Source File: PolarPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Create a list of ticks based on the given list and plot properties.
 * Only ticks of a specific type may be in the result list.
 *
 * @param allTicks A list of all available ticks for the primary axis.
 *        <code>null</code> not permitted.
 * @return Ticks to use for radial gridlines.
 * @since 1.0.15
 */
protected List buildRadialTicks(List allTicks)
{
    List ticks = new ArrayList();
    Iterator it = allTicks.iterator();
    while (it.hasNext()) {
        ValueTick tick = (ValueTick) it.next();
        if (isRadiusMinorGridlinesVisible() ||
                TickType.MAJOR.equals(tick.getTickType())) {
            ticks.add(tick);
        }
    }
    return ticks;
}
 
Example #3
Source File: XYPlot.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot's primary range axis, if they are
 * visible.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
                                  List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        ValueAxis axis = getRangeAxis();
        if (axis != null) {
            Iterator iterator = ticks.iterator();
            boolean paintLine;
            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) {
                    getRenderer().drawRangeLine(g2, this, getRangeAxis(),
                            area, tick.getValue(), gridPaint, gridStroke);
                }
            }
        }
    }
}
 
Example #4
Source File: XYPlot.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            } else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #5
Source File: PolarPlot.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a list of ticks based on the given list and plot properties.
 * Only ticks of a specific type may be in the result list.
 *
 * @param allTicks A list of all available ticks for the primary axis.
 *        <code>null</code> not permitted.
 * @return Ticks to use for radial gridlines.
 * @since 1.0.15
 */
protected List buildRadialTicks(List allTicks)
{
    List ticks = new ArrayList();
    Iterator it = allTicks.iterator();
    while (it.hasNext()) {
        ValueTick tick = (ValueTick) it.next();
        if (isRadiusMinorGridlinesVisible() ||
                TickType.MAJOR.equals(tick.getTickType())) {
            ticks.add(tick);
        }
    }
    return ticks;
}
 
Example #6
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            } else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #7
Source File: Cardumen_0082_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine = false;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            }
            else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #8
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot's primary range axis, if they are
 * visible.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
                                  List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        ValueAxis axis = getRangeAxis();
        if (axis != null) {
            Iterator iterator = ticks.iterator();
            boolean paintLine;
            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) {
                    getRenderer().drawRangeLine(g2, this, getRangeAxis(),
                            area, tick.getValue(), gridPaint, gridStroke);
                }
            }
        }
    }
}
 
Example #9
Source File: Cardumen_0082_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine = false;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            }
            else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #10
Source File: Cardumen_009_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine = false;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            }
            else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #11
Source File: PolarPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Create a list of ticks based on the given list and plot properties.
 * Only ticks of a specific type may be in the result list.
 *
 * @param allTicks A list of all available ticks for the primary axis.
 *        <code>null</code> not permitted.
 * @return Ticks to use for radial gridlines.
 * @since 1.0.15
 */
protected List buildRadialTicks(List allTicks)
{
    List ticks = new ArrayList();
    Iterator it = allTicks.iterator();
    while (it.hasNext()) {
        ValueTick tick = (ValueTick) it.next();
        if (isRadiusMinorGridlinesVisible() ||
                TickType.MAJOR.equals(tick.getTickType())) {
            ticks.add(tick);
        }
    }
    return ticks;
}
 
Example #12
Source File: Cardumen_009_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine = false;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            }
            else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #13
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            } else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #14
Source File: XYPlot.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot's primary range axis, if they are
 * visible.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
                                  List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        ValueAxis axis = getRangeAxis();
        if (axis != null) {
            Iterator iterator = ticks.iterator();
            boolean paintLine;
            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) {
                    getRenderer().drawRangeLine(g2, this, getRangeAxis(),
                            area, tick.getValue(), gridPaint, gridStroke);
                }
            }
        }
    }
}
 
Example #15
Source File: XYPlot.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            } else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #16
Source File: PolarPlot.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Create a list of ticks based on the given list and plot properties.
 * Only ticks of a specific type may be in the result list.
 *
 * @param allTicks A list of all available ticks for the primary axis.
 *        <code>null</code> not permitted.
 * @return Ticks to use for radial gridlines.
 * @since 1.0.15
 */
protected List buildRadialTicks(List allTicks)
{
    List ticks = new ArrayList();
    Iterator it = allTicks.iterator();
    while (it.hasNext()) {
        ValueTick tick = (ValueTick) it.next();
        if (isRadiusMinorGridlinesVisible() ||
                TickType.MAJOR.equals(tick.getTickType())) {
            ticks.add(tick);
        }
    }
    return ticks;
}
 
Example #17
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot's primary range axis, if they are
 * visible.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
                                  List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        ValueAxis axis = getRangeAxis();
        if (axis != null) {
            Iterator iterator = ticks.iterator();
            boolean paintLine;
            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) {
                    getRenderer().drawRangeLine(g2, this, getRangeAxis(),
                            area, tick.getValue(), gridPaint, gridStroke);
                }
            }
        }
    }
}
 
Example #18
Source File: XYPlot.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot's primary range axis, if they are
 * visible.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
                                  List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        ValueAxis axis = getRangeAxis();
        if (axis != null) {
            Iterator iterator = ticks.iterator();
            boolean paintLine;
            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) {
                    getRenderer().drawRangeLine(g2, this, getRangeAxis(),
                            area, tick.getValue(), gridPaint, gridStroke);
                }
            }
        }
    }
}
 
Example #19
Source File: XYPlot.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot, if they are visible.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawRangeGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible() || isDomainMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        Iterator iterator = ticks.iterator();
        boolean paintLine;
        while (iterator.hasNext()) {
            paintLine = false;
            ValueTick tick = (ValueTick) iterator.next();
            if ((tick.getTickType() == TickType.MINOR)
                    && isDomainMinorGridlinesVisible()) {
                gridStroke = getDomainMinorGridlineStroke();
                gridPaint = getDomainMinorGridlinePaint();
                paintLine = true;
            } else if ((tick.getTickType() == TickType.MAJOR)
                    && isDomainGridlinesVisible()) {
                gridStroke = getDomainGridlineStroke();
                gridPaint = getDomainGridlinePaint();
                paintLine = true;
            }
            XYItemRenderer r = getRenderer();
            if ((r instanceof AbstractXYItemRenderer) && paintLine) {
                ((AbstractXYItemRenderer) r).drawDomainLine(g2, this,
                        getDomainAxis(), dataArea, tick.getValue(),
                        gridPaint, gridStroke);
            }
        }
    }
}
 
Example #20
Source File: PolarPlot.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Create a list of ticks based on the given list and plot properties.
 * Only ticks of a specific type may be in the result list.
 *
 * @param allTicks A list of all available ticks for the primary axis.
 *        <code>null</code> not permitted.
 * @return Ticks to use for radial gridlines.
 * @since 1.0.15
 */
protected List buildRadialTicks(List allTicks)
{
    List ticks = new ArrayList();
    Iterator it = allTicks.iterator();
    while (it.hasNext()) {
        ValueTick tick = (ValueTick) it.next();
        if (isRadiusMinorGridlinesVisible() ||
                TickType.MAJOR.equals(tick.getTickType())) {
            ticks.add(tick);
        }
    }
    return ticks;
}
 
Example #21
Source File: PolarPlot.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Create a list of ticks based on the given list and plot properties.
 * Only ticks of a specific type may be in the result list.
 *
 * @param allTicks A list of all available ticks for the primary axis.
 *        <code>null</code> not permitted.
 * @return Ticks to use for radial gridlines.
 * @since 1.0.15
 */
protected List buildRadialTicks(List allTicks)
{
    List ticks = new ArrayList();
    Iterator it = allTicks.iterator();
    while (it.hasNext()) {
        ValueTick tick = (ValueTick) it.next();
        if (isRadiusMinorGridlinesVisible() ||
                TickType.MAJOR.equals(tick.getTickType())) {
            ticks.add(tick);
        }
    }
    return ticks;
}
 
Example #22
Source File: XYPlot.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws the gridlines for the plot's primary range axis, if they are
 * visible.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
                                  List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        ValueAxis axis = getRangeAxis();
        if (axis != null) {
            Iterator iterator = ticks.iterator();
            boolean paintLine;
            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) {
                    getRenderer().drawRangeLine(g2, this, getRangeAxis(),
                            area, tick.getValue(), gridPaint, gridStroke);
                }
            }
        }
    }
}
 
Example #23
Source File: CategoryPlot.java    From buffer_bci with GNU General Public License v3.0 4 votes vote down vote up
/**
 * 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());
            }
        }
    }
}
 
Example #24
Source File: CategoryPlot.java    From buffer_bci with GNU General Public License v3.0 4 votes vote down vote up
/**
 * 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());
            }
        }
    }
}
 
Example #25
Source File: CategoryPlot.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Draws the range gridlines for the plot, if they are visible.
 *
 * @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() && !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 = 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) {
                r.drawRangeLine(g2, this, axis, dataArea, tick.getValue(),
                        gridPaint, gridStroke);
        }
    }
}
 
Example #26
Source File: DateTickTests.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Confirm that the equals method can distinguish all the required fields.
 */
public void testEquals() {

    Date d1 = new Date(0L);
    Date d2 = new Date(1L);
    String l1 = "Label 1";
    String l2 = "Label 2";
    TextAnchor ta1 = TextAnchor.CENTER;
    TextAnchor ta2 = TextAnchor.BASELINE_LEFT;

    DateTick t1 = new DateTick(d1, l1, ta1, ta1, Math.PI / 2.0);
    DateTick t2 = new DateTick(d1, l1, ta1, ta1, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d2, l1, ta1, ta1, Math.PI / 2.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d2, l1, ta1, ta1, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d1, l2, ta1, ta1, Math.PI / 2.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d1, l2, ta1, ta1, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d1, l1, ta2, ta1, Math.PI / 2.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d1, l1, ta2, ta1, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d1, l1, ta1, ta2, Math.PI / 2.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d1, l1, ta1, ta2, Math.PI / 2.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(d1, l1, ta1, ta1, Math.PI / 3.0);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(d1, l1, ta1, ta1, Math.PI / 3.0);
    assertTrue(t1.equals(t2));

    t1 = new DateTick(TickType.MINOR, d1, l1, ta1, ta1, Math.PI);
    t2 = new DateTick(TickType.MAJOR, d1, l1, ta1, ta1, Math.PI);
    assertFalse(t1.equals(t2));
    t2 = new DateTick(TickType.MINOR, d1, l1, ta1, ta1, Math.PI);
    assertTrue(t1.equals(t2));

}
 
Example #27
Source File: CategoryPlot.java    From ECG-Viewer with GNU General Public License v2.0 4 votes vote down vote up
/**
 * 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());
            }
        }
    }
}
 
Example #28
Source File: Cardumen_0082_s.java    From coming with MIT License 4 votes vote down vote up
/**
 * Draws the gridlines for the plot's primary range axis, if they are
 * visible.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
                                  List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        ValueAxis axis = getRangeAxis();
        if (axis != null) {
            Iterator iterator = ticks.iterator();
            boolean paintLine = false;
            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) {
                    getRenderer().drawRangeLine(g2, this, getRangeAxis(),
                            area, tick.getValue(), gridPaint, gridStroke);
                }
            }
        }
    }
}
 
Example #29
Source File: Cardumen_0082_t.java    From coming with MIT License 4 votes vote down vote up
/**
 * Draws the gridlines for the plot's primary range axis, if they are
 * visible.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
                                  List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        ValueAxis axis = getRangeAxis();
        if (axis != null) {
            Iterator iterator = ticks.iterator();
            boolean paintLine = false;
            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) {
                    getRenderer().drawRangeLine(g2, this, getRangeAxis(),
                            area, tick.getValue(), gridPaint, gridStroke);
                }
            }
        }
    }
}
 
Example #30
Source File: Cardumen_009_t.java    From coming with MIT License 4 votes vote down vote up
/**
 * Draws the gridlines for the plot's primary range axis, if they are
 * visible.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D, List)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D area,
                                  List ticks) {

    // no renderer, no gridlines...
    if (getRenderer() == null) {
        return;
    }

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible() || isRangeMinorGridlinesVisible()) {
        Stroke gridStroke = null;
        Paint gridPaint = null;
        ValueAxis axis = getRangeAxis();
        if (axis != null) {
            Iterator iterator = ticks.iterator();
            boolean paintLine = false;
            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) {
                    getRenderer().drawRangeLine(g2, this, getRangeAxis(),
                            area, tick.getValue(), gridPaint, gridStroke);
                }
            }
        }
    }
}