Java 类org.jfree.chart.axis.TickType 实例源码

项目:ccu-historian    文件:PolarPlot.java   
/**
 * 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;
}
项目:ccu-historian    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:ccu-historian    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}
项目:jfreechart    文件:PolarPlot.java   
/**
 * 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} 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;
}
项目:jfreechart    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:jfreechart    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}
项目:aya-lang    文件:PolarPlot.java   
/**
 * 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;
}
项目:aya-lang    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:aya-lang    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}
项目:populus    文件:PolarPlot.java   
/**
 * 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;
}
项目:populus    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:populus    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}
项目:PI    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:ECG-Viewer    文件:PolarPlot.java   
/**
 * 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;
}
项目:ECG-Viewer    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:ECG-Viewer    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}
项目:astor    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:group-five    文件:PolarPlot.java   
/**
 * 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;
}
项目:group-five    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:group-five    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}
项目:manydesigns.cn    文件:PolarPlot.java   
/**
 * 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;
}
项目:manydesigns.cn    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:buffer_bci    文件:PolarPlot.java   
/**
 * 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;
}
项目:buffer_bci    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:buffer_bci    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}
项目:buffer_bci    文件:PolarPlot.java   
/**
 * 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;
}
项目:buffer_bci    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:buffer_bci    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}
项目:proyecto-teoria-control-utn-frro    文件:PolarPlot.java   
/**
 * 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;
}
项目:proyecto-teoria-control-utn-frro    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:Memetic-Algorithm-for-TSP    文件:PolarPlot.java   
/**
 * 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;
}
项目:Memetic-Algorithm-for-TSP    文件:XYPlot.java   
/**
 * 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);
            }
        }
    }
}
项目:ccu-historian    文件:CategoryPlot.java   
/**
 * 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());
            }
        }
    }
}
项目:jfreechart    文件:CategoryPlot.java   
/**
 * 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) {
            r .drawRangeLine(g2, this, axis, dataArea,
                        tick.getValue(), gridPaint, gridStroke);
        }
    }
}
项目:aya-lang    文件:CategoryPlot.java   
/**
 * 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());
            }
        }
    }
}
项目:populus    文件:CategoryPlot.java   
/**
 * 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());
            }
        }
    }
}
项目:PI    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}
项目:PI    文件:CategoryPlot.java   
/**
 * 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) {
            // 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());
            }
        }
    }
}
项目:ECG-Viewer    文件:CategoryPlot.java   
/**
 * 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());
            }
        }
    }
}
项目:astor    文件:XYPlot.java   
/**
 * 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);
                }
            }
        }
    }
}