Java Code Examples for org.jfree.chart.renderer.xy.AbstractXYItemRenderer#drawDomainLine()

The following examples show how to use org.jfree.chart.renderer.xy.AbstractXYItemRenderer#drawDomainLine() . 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 a base line across the chart at value zero on the domain axis.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 *
 * @see #setDomainZeroBaselineVisible(boolean)
 *
 * @since 1.0.5
 */
protected void drawZeroDomainBaseline(Graphics2D g2, Rectangle2D area) {
    if (isDomainZeroBaselineVisible()) {
        XYItemRenderer r = getRenderer();
        // FIXME: the renderer interface doesn't have the drawDomainLine()
        // method, so we have to rely on the renderer being a subclass of
        // AbstractXYItemRenderer (which is lame)
        if (r instanceof AbstractXYItemRenderer) {
            AbstractXYItemRenderer renderer = (AbstractXYItemRenderer) r;
            renderer.drawDomainLine(g2, this, getDomainAxis(), area, 0.0,
                    this.domainZeroBaselinePaint,
                    this.domainZeroBaselineStroke);
        }
    }
}
 
Example 2
Source File: XYPlot.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws a base line across the chart at value zero on the domain axis.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 *
 * @see #setDomainZeroBaselineVisible(boolean)
 *
 * @since 1.0.5
 */
protected void drawZeroDomainBaseline(Graphics2D g2, Rectangle2D area) {
    if (isDomainZeroBaselineVisible()) {
        XYItemRenderer r = getRenderer();
        // FIXME: the renderer interface doesn't have the drawDomainLine()
        // method, so we have to rely on the renderer being a subclass of
        // AbstractXYItemRenderer (which is lame)
        if (r instanceof AbstractXYItemRenderer) {
            AbstractXYItemRenderer renderer = (AbstractXYItemRenderer) r;
            renderer.drawDomainLine(g2, this, getDomainAxis(), area, 0.0,
                    this.domainZeroBaselinePaint,
                    this.domainZeroBaselineStroke);
        }
    }
}
 
Example 3
Source File: XYPlot.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Draws a base line across the chart at value zero on the domain axis.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 *
 * @see #setDomainZeroBaselineVisible(boolean)
 *
 * @since 1.0.5
 */
protected void drawZeroDomainBaseline(Graphics2D g2, Rectangle2D area) {
    if (isDomainZeroBaselineVisible()) {
        XYItemRenderer r = getRenderer();
        // FIXME: the renderer interface doesn't have the drawDomainLine()
        // method, so we have to rely on the renderer being a subclass of
        // AbstractXYItemRenderer (which is lame)
        if (r instanceof AbstractXYItemRenderer) {
            AbstractXYItemRenderer renderer = (AbstractXYItemRenderer) r;
            renderer.drawDomainLine(g2, this, getDomainAxis(), area, 0.0,
                    this.domainZeroBaselinePaint,
                    this.domainZeroBaselineStroke);
        }
    }
}
 
Example 4
Source File: XYPlot.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Draws a base line across the chart at value zero on the domain axis.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 *
 * @see #setDomainZeroBaselineVisible(boolean)
 *
 * @since 1.0.5
 */
protected void drawZeroDomainBaseline(Graphics2D g2, Rectangle2D area) {
    if (isDomainZeroBaselineVisible()) {
        XYItemRenderer r = getRenderer();
        // FIXME: the renderer interface doesn't have the drawDomainLine()
        // method, so we have to rely on the renderer being a subclass of
        // AbstractXYItemRenderer (which is lame)
        if (r instanceof AbstractXYItemRenderer) {
            AbstractXYItemRenderer renderer = (AbstractXYItemRenderer) r;
            renderer.drawDomainLine(g2, this, getDomainAxis(), area, 0.0,
                    this.domainZeroBaselinePaint,
                    this.domainZeroBaselineStroke);
        }
    }
}
 
Example 5
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws a base line across the chart at value zero on the domain axis.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 *
 * @see #setDomainZeroBaselineVisible(boolean)
 *
 * @since 1.0.5
 */
protected void drawZeroDomainBaseline(Graphics2D g2, Rectangle2D area) {
    if (isDomainZeroBaselineVisible()) {
        XYItemRenderer r = getRenderer();
        // FIXME: the renderer interface doesn't have the drawDomainLine()
        // method, so we have to rely on the renderer being a subclass of
        // AbstractXYItemRenderer (which is lame)
        if (r instanceof AbstractXYItemRenderer) {
            AbstractXYItemRenderer renderer = (AbstractXYItemRenderer) r;
            renderer.drawDomainLine(g2, this, getDomainAxis(), area, 0.0,
                    this.domainZeroBaselinePaint,
                    this.domainZeroBaselineStroke);
        }
    }
}
 
Example 6
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Draws a base line across the chart at value zero on the domain axis.
 *
 * @param g2  the graphics device.
 * @param area  the data area.
 *
 * @see #setDomainZeroBaselineVisible(boolean)
 *
 * @since 1.0.5
 */
protected void drawZeroDomainBaseline(Graphics2D g2, Rectangle2D area) {
    if (isDomainZeroBaselineVisible()) {
        XYItemRenderer r = getRenderer();
        // FIXME: the renderer interface doesn't have the drawDomainLine()
        // method, so we have to rely on the renderer being a subclass of
        // AbstractXYItemRenderer (which is lame)
        if (r instanceof AbstractXYItemRenderer) {
            AbstractXYItemRenderer renderer = (AbstractXYItemRenderer) r;
            renderer.drawDomainLine(g2, this, getDomainAxis(), area, 0.0,
                    this.domainZeroBaselinePaint,
                    this.domainZeroBaselineStroke);
        }
    }
}