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

项目:parabuild-ci    文件:XYPlot.java   
/**
 * Draws the domain tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 */
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks) {
    // draw the domain tick bands, if any...
    Paint bandPaint = getDomainTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        final ValueAxis xAxis = getDomainAxis();
        double previous = xAxis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea, previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = xAxis.getUpperBound();
        if (fillBand) {
            getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea, previous, end);
        }
    }
}
项目:parabuild-ci    文件:XYPlot.java   
/**
 * Draws the range tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 */
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea, List ticks) {

    // draw the range tick bands, if any...
    Paint bandPaint = getRangeTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        final ValueAxis axis = getRangeAxis();
        double previous = axis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillRangeGridBand(g2, this, axis, dataArea, previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = axis.getUpperBound();
        if (fillBand) {
            getRenderer().fillRangeGridBand(g2, this, axis, dataArea, previous, end);
        }
    }
}
项目:parabuild-ci    文件: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.
 */
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()) {
        Stroke gridStroke = getDomainGridlineStroke();
        Paint gridPaint = getDomainGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            Iterator iterator = ticks.iterator();
            while (iterator.hasNext()) {
                ValueTick tick = (ValueTick) iterator.next();
                getRenderer().drawDomainGridLine(
                    g2, this, getDomainAxis(), dataArea, tick.getValue()
                );
            }
        }
    }
}
项目:parabuild-ci    文件: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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible()) {
        Stroke gridStroke = getRangeGridlineStroke();
        Paint gridPaint = getRangeGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            ValueAxis axis = getRangeAxis();
            if (axis != null) {
                Iterator iterator = ticks.iterator();
                while (iterator.hasNext()) {
                    ValueTick tick = (ValueTick) iterator.next();
                    getRenderer().drawRangeGridLine(
                        g2, this, getRangeAxis(), dataArea, tick.getValue()
                    );
                }
            }
        }
    }

}
项目:parabuild-ci    文件:FastScatterPlot.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.
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {

    // draw the domain grid lines, if any...
    if (isDomainGridlinesVisible()) {
        Stroke gridStroke = getDomainGridlineStroke();
        Paint gridPaint = getDomainGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            Iterator iterator = ticks.iterator();
            while (iterator.hasNext()) {
                ValueTick tick = (ValueTick) iterator.next();
                double v = this.domainAxis.valueToJava2D(
                    tick.getValue(), dataArea, RectangleEdge.BOTTOM
                );
                Line2D line = new Line2D.Double(v, dataArea.getMinY(), v, dataArea.getMaxY());
                g2.setPaint(gridPaint);
                g2.setStroke(gridStroke);
                g2.draw(line);                
            }
        }
    }
}
项目:parabuild-ci    文件:FastScatterPlot.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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {

    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible()) {
        Stroke gridStroke = getRangeGridlineStroke();
        Paint gridPaint = getRangeGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            Iterator iterator = ticks.iterator();
            while (iterator.hasNext()) {
                ValueTick tick = (ValueTick) iterator.next();
                double v = this.rangeAxis.valueToJava2D(
                    tick.getValue(), dataArea, RectangleEdge.LEFT
                );
                Line2D line = new Line2D.Double(dataArea.getMinX(), v, dataArea.getMaxX(), v);
                g2.setPaint(gridPaint);
                g2.setStroke(gridStroke);
                g2.draw(line);                
            }
        }
    }

}
项目:parabuild-ci    文件:CategoryPlot.java   
/**
 * Draws the gridlines for the plot.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param ticks  the ticks.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, List ticks) {
    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible()) {
        Stroke gridStroke = getRangeGridlineStroke();
        Paint gridPaint = getRangeGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            ValueAxis axis = getRangeAxis();
            if (axis != null) {
                Iterator iterator = ticks.iterator();
                while (iterator.hasNext()) {
                    ValueTick tick = (ValueTick) iterator.next();
                    CategoryItemRenderer renderer1 = getRenderer();
                    if (renderer1 != null) {
                        renderer1.drawRangeGridline(
                            g2, this, getRangeAxis(), dataArea, tick.getValue()
                        );
                    }
                }
            }
        }
    }
}
项目:parabuild-ci    文件: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.
 */
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()) {
        Stroke gridStroke = getDomainGridlineStroke();
        Paint gridPaint = getDomainGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            Iterator iterator = ticks.iterator();
            while (iterator.hasNext()) {
                ValueTick tick = (ValueTick) iterator.next();
                getRenderer().drawDomainGridLine(g2, this, getDomainAxis(),
                        dataArea, tick.getValue());
            }
        }
    }
}
项目:parabuild-ci    文件:FastScatterPlot.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.
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, 
                                   List ticks) {

    // draw the domain grid lines, if the flag says they're visible...
    if (isDomainGridlinesVisible()) {
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double v = this.domainAxis.valueToJava2D(tick.getValue(), 
                    dataArea, RectangleEdge.BOTTOM);
            Line2D line = new Line2D.Double(v, dataArea.getMinY(), v, 
                    dataArea.getMaxY());
            g2.setPaint(getDomainGridlinePaint());
            g2.setStroke(getDomainGridlineStroke());
            g2.draw(line);                
        }
    }
}
项目:parabuild-ci    文件:FastScatterPlot.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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, 
                                  List ticks) {

    // draw the range grid lines, if the flag says they're visible...
    if (isRangeGridlinesVisible()) {
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double v = this.rangeAxis.valueToJava2D(tick.getValue(), 
                    dataArea, RectangleEdge.LEFT);
            Line2D line = new Line2D.Double(dataArea.getMinX(), v, 
                    dataArea.getMaxX(), v);
            g2.setPaint(getRangeGridlinePaint());
            g2.setStroke(getRangeGridlineStroke());
            g2.draw(line);                
        }
    }

}
项目:parabuild-ci    文件:CategoryPlot.java   
/**
 * Draws the gridlines for the plot.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param ticks  the ticks.
 * 
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, 
                                  List ticks) {
    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible()) {
        Stroke gridStroke = getRangeGridlineStroke();
        Paint gridPaint = getRangeGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            ValueAxis axis = getRangeAxis();
            if (axis != null) {
                Iterator iterator = ticks.iterator();
                while (iterator.hasNext()) {
                    ValueTick tick = (ValueTick) iterator.next();
                    CategoryItemRenderer renderer1 = getRenderer();
                    if (renderer1 != null) {
                        renderer1.drawRangeGridline(g2, this, 
                                getRangeAxis(), dataArea, tick.getValue());
                    }
                }
            }
        }
    }
}
项目:ccu-historian    文件:XYPlot.java   
/**
 * Draws the domain tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setDomainTickBandPaint(Paint)
 */
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea,
                                List ticks) {
    Paint bandPaint = getDomainTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis xAxis = getDomainAxis();
        double previous = xAxis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = xAxis.getUpperBound();
        if (fillBand) {
            getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                    previous, end);
        }
    }
}
项目:ccu-historian    文件:XYPlot.java   
/**
 * Draws the range tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setRangeTickBandPaint(Paint)
 */
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea,
                               List ticks) {
    Paint bandPaint = getRangeTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis axis = getRangeAxis();
        double previous = axis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = axis.getUpperBound();
        if (fillBand) {
            getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                    previous, end);
        }
    }
}
项目:ccu-historian    文件:FastScatterPlot.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.
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
        List ticks) {
    if (!isDomainGridlinesVisible()) {
        return;
    }
    Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, 
            RenderingHints.VALUE_STROKE_NORMALIZE);
    Iterator iterator = ticks.iterator();
    while (iterator.hasNext()) {
        ValueTick tick = (ValueTick) iterator.next();
        double v = this.domainAxis.valueToJava2D(tick.getValue(),
                dataArea, RectangleEdge.BOTTOM);
        Line2D line = new Line2D.Double(v, dataArea.getMinY(), v,
                dataArea.getMaxY());
        g2.setPaint(getDomainGridlinePaint());
        g2.setStroke(getDomainGridlineStroke());
        g2.draw(line);
    }
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}
项目:ccu-historian    文件:FastScatterPlot.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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
        List ticks) {

    if (!isRangeGridlinesVisible()) {
        return;
    }
    Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, 
            RenderingHints.VALUE_STROKE_NORMALIZE);

    Iterator iterator = ticks.iterator();
    while (iterator.hasNext()) {
        ValueTick tick = (ValueTick) iterator.next();
        double v = this.rangeAxis.valueToJava2D(tick.getValue(),
                dataArea, RectangleEdge.LEFT);
        Line2D line = new Line2D.Double(dataArea.getMinX(), v,
                dataArea.getMaxX(), v);
        g2.setPaint(getRangeGridlinePaint());
        g2.setStroke(getRangeGridlineStroke());
        g2.draw(line);
    }
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}
项目:jfreechart    文件:XYPlot.java   
/**
 * Draws the domain tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setDomainTickBandPaint(Paint)
 */
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea,
                                List ticks) {
    Paint bandPaint = getDomainTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis xAxis = getDomainAxis();
        double previous = xAxis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = xAxis.getUpperBound();
        if (fillBand) {
            getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                    previous, end);
        }
    }
}
项目:jfreechart    文件:XYPlot.java   
/**
 * Draws the range tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setRangeTickBandPaint(Paint)
 */
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea,
                               List ticks) {
    Paint bandPaint = getRangeTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis axis = getRangeAxis();
        double previous = axis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = axis.getUpperBound();
        if (fillBand) {
            getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                    previous, end);
        }
    }
}
项目:jfreechart    文件:FastScatterPlot.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.
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
        List ticks) {
    if (!isDomainGridlinesVisible()) {
        return;
    }
    Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, 
            RenderingHints.VALUE_STROKE_NORMALIZE);
    Iterator iterator = ticks.iterator();
    while (iterator.hasNext()) {
        ValueTick tick = (ValueTick) iterator.next();
        double v = this.domainAxis.valueToJava2D(tick.getValue(),
                dataArea, RectangleEdge.BOTTOM);
        Line2D line = new Line2D.Double(v, dataArea.getMinY(), v,
                dataArea.getMaxY());
        g2.setPaint(getDomainGridlinePaint());
        g2.setStroke(getDomainGridlineStroke());
        g2.draw(line);
    }
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}
项目:jfreechart    文件:FastScatterPlot.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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
        List ticks) {

    if (!isRangeGridlinesVisible()) {
        return;
    }
    Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, 
            RenderingHints.VALUE_STROKE_NORMALIZE);

    Iterator iterator = ticks.iterator();
    while (iterator.hasNext()) {
        ValueTick tick = (ValueTick) iterator.next();
        double v = this.rangeAxis.valueToJava2D(tick.getValue(),
                dataArea, RectangleEdge.LEFT);
        Line2D line = new Line2D.Double(dataArea.getMinX(), v,
                dataArea.getMaxX(), v);
        g2.setPaint(getRangeGridlinePaint());
        g2.setStroke(getRangeGridlineStroke());
        g2.draw(line);
    }
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}
项目:aya-lang    文件:XYPlot.java   
/**
 * Draws the domain tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setDomainTickBandPaint(Paint)
 */
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea,
                                List ticks) {
    Paint bandPaint = getDomainTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis xAxis = getDomainAxis();
        double previous = xAxis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = xAxis.getUpperBound();
        if (fillBand) {
            getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                    previous, end);
        }
    }
}
项目:aya-lang    文件:XYPlot.java   
/**
 * Draws the range tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setRangeTickBandPaint(Paint)
 */
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea,
                               List ticks) {
    Paint bandPaint = getRangeTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis axis = getRangeAxis();
        double previous = axis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = axis.getUpperBound();
        if (fillBand) {
            getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                    previous, end);
        }
    }
}
项目:aya-lang    文件:FastScatterPlot.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.
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
        List ticks) {
    if (!isDomainGridlinesVisible()) {
        return;
    }
    Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, 
            RenderingHints.VALUE_STROKE_NORMALIZE);
    Iterator iterator = ticks.iterator();
    while (iterator.hasNext()) {
        ValueTick tick = (ValueTick) iterator.next();
        double v = this.domainAxis.valueToJava2D(tick.getValue(),
                dataArea, RectangleEdge.BOTTOM);
        Line2D line = new Line2D.Double(v, dataArea.getMinY(), v,
                dataArea.getMaxY());
        g2.setPaint(getDomainGridlinePaint());
        g2.setStroke(getDomainGridlineStroke());
        g2.draw(line);
    }
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}
项目:aya-lang    文件:FastScatterPlot.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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
        List ticks) {

    if (!isRangeGridlinesVisible()) {
        return;
    }
    Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, 
            RenderingHints.VALUE_STROKE_NORMALIZE);

    Iterator iterator = ticks.iterator();
    while (iterator.hasNext()) {
        ValueTick tick = (ValueTick) iterator.next();
        double v = this.rangeAxis.valueToJava2D(tick.getValue(),
                dataArea, RectangleEdge.LEFT);
        Line2D line = new Line2D.Double(dataArea.getMinX(), v,
                dataArea.getMaxX(), v);
        g2.setPaint(getRangeGridlinePaint());
        g2.setStroke(getRangeGridlineStroke());
        g2.draw(line);
    }
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}
项目:HTML5_WebSite    文件:XYPlot.java   
/**
 * Draws the domain tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setDomainTickBandPaint(Paint)
 */
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea,
                                List ticks) {
    Paint bandPaint = getDomainTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis xAxis = getDomainAxis();
        double previous = xAxis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = xAxis.getUpperBound();
        if (fillBand) {
            getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                    previous, end);
        }
    }
}
项目:HTML5_WebSite    文件:XYPlot.java   
/**
 * Draws the range tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setRangeTickBandPaint(Paint)
 */
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea,
                               List ticks) {
    Paint bandPaint = getRangeTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis axis = getRangeAxis();
        double previous = axis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = axis.getUpperBound();
        if (fillBand) {
            getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                    previous, end);
        }
    }
}
项目:HTML5_WebSite    文件: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()) {
        Stroke gridStroke = getDomainGridlineStroke();
        Paint gridPaint = getDomainGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            Iterator iterator = ticks.iterator();
            while (iterator.hasNext()) {
                ValueTick tick = (ValueTick) iterator.next();
                getRenderer().drawDomainGridLine(g2, this, getDomainAxis(),
                        dataArea, tick.getValue());
            }
        }
    }
}
项目:HTML5_WebSite    文件:FastScatterPlot.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.
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // draw the domain grid lines, if the flag says they're visible...
    if (isDomainGridlinesVisible()) {
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double v = this.domainAxis.valueToJava2D(tick.getValue(),
                    dataArea, RectangleEdge.BOTTOM);
            Line2D line = new Line2D.Double(v, dataArea.getMinY(), v,
                    dataArea.getMaxY());
            g2.setPaint(getDomainGridlinePaint());
            g2.setStroke(getDomainGridlineStroke());
            g2.draw(line);
        }
    }
}
项目:HTML5_WebSite    文件:FastScatterPlot.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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
                                  List ticks) {

    // draw the range grid lines, if the flag says they're visible...
    if (isRangeGridlinesVisible()) {
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double v = this.rangeAxis.valueToJava2D(tick.getValue(),
                    dataArea, RectangleEdge.LEFT);
            Line2D line = new Line2D.Double(dataArea.getMinX(), v,
                    dataArea.getMaxX(), v);
            g2.setPaint(getRangeGridlinePaint());
            g2.setStroke(getRangeGridlineStroke());
            g2.draw(line);
        }
    }

}
项目:HTML5_WebSite    文件:CategoryPlot.java   
/**
 * Draws the gridlines for the plot.
 *
 * @param g2  the graphics device.
 * @param dataArea  the area inside the axes.
 * @param ticks  the ticks.
 *
 * @see #drawDomainGridlines(Graphics2D, Rectangle2D)
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
                                  List ticks) {
    // draw the range grid lines, if any...
    if (isRangeGridlinesVisible()) {
        Stroke gridStroke = getRangeGridlineStroke();
        Paint gridPaint = getRangeGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            ValueAxis axis = getRangeAxis();
            if (axis != null) {
                Iterator iterator = ticks.iterator();
                while (iterator.hasNext()) {
                    ValueTick tick = (ValueTick) iterator.next();
                    CategoryItemRenderer renderer1 = getRenderer();
                    if (renderer1 != null) {
                        renderer1.drawRangeGridline(g2, this,
                                getRangeAxis(), dataArea, tick.getValue());
                    }
                }
            }
        }
    }
}
项目:populus    文件:XYPlot.java   
/**
 * Draws the domain tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setDomainTickBandPaint(Paint)
 */
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea,
                                List ticks) {
    Paint bandPaint = getDomainTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis xAxis = getDomainAxis();
        double previous = xAxis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = xAxis.getUpperBound();
        if (fillBand) {
            getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                    previous, end);
        }
    }
}
项目:populus    文件:XYPlot.java   
/**
 * Draws the range tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setRangeTickBandPaint(Paint)
 */
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea,
                               List ticks) {
    Paint bandPaint = getRangeTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis axis = getRangeAxis();
        double previous = axis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = axis.getUpperBound();
        if (fillBand) {
            getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                    previous, end);
        }
    }
}
项目:populus    文件:FastScatterPlot.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.
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
        List ticks) {
    if (!isDomainGridlinesVisible()) {
        return;
    }
    Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, 
            RenderingHints.VALUE_STROKE_NORMALIZE);
    Iterator iterator = ticks.iterator();
    while (iterator.hasNext()) {
        ValueTick tick = (ValueTick) iterator.next();
        double v = this.domainAxis.valueToJava2D(tick.getValue(),
                dataArea, RectangleEdge.BOTTOM);
        Line2D line = new Line2D.Double(v, dataArea.getMinY(), v,
                dataArea.getMaxY());
        g2.setPaint(getDomainGridlinePaint());
        g2.setStroke(getDomainGridlineStroke());
        g2.draw(line);
    }
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}
项目:populus    文件:FastScatterPlot.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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
        List ticks) {

    if (!isRangeGridlinesVisible()) {
        return;
    }
    Object saved = g2.getRenderingHint(RenderingHints.KEY_STROKE_CONTROL);
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, 
            RenderingHints.VALUE_STROKE_NORMALIZE);

    Iterator iterator = ticks.iterator();
    while (iterator.hasNext()) {
        ValueTick tick = (ValueTick) iterator.next();
        double v = this.rangeAxis.valueToJava2D(tick.getValue(),
                dataArea, RectangleEdge.LEFT);
        Line2D line = new Line2D.Double(dataArea.getMinX(), v,
                dataArea.getMaxX(), v);
        g2.setPaint(getRangeGridlinePaint());
        g2.setStroke(getRangeGridlineStroke());
        g2.draw(line);
    }
    g2.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, saved);
}
项目:PI    文件:XYPlot.java   
/**
 * Draws the domain tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setDomainTickBandPaint(Paint)
 */
public void drawDomainTickBands(Graphics2D g2, Rectangle2D dataArea,
                                List ticks) {
    Paint bandPaint = getDomainTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis xAxis = getDomainAxis();
        double previous = xAxis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = xAxis.getUpperBound();
        if (fillBand) {
            getRenderer().fillDomainGridBand(g2, this, xAxis, dataArea,
                    previous, end);
        }
    }
}
项目:PI    文件:XYPlot.java   
/**
 * Draws the range tick bands, if any.
 *
 * @param g2  the graphics device.
 * @param dataArea  the data area.
 * @param ticks  the ticks.
 *
 * @see #setRangeTickBandPaint(Paint)
 */
public void drawRangeTickBands(Graphics2D g2, Rectangle2D dataArea,
                               List ticks) {
    Paint bandPaint = getRangeTickBandPaint();
    if (bandPaint != null) {
        boolean fillBand = false;
        ValueAxis axis = getRangeAxis();
        double previous = axis.getLowerBound();
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double current = tick.getValue();
            if (fillBand) {
                getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                        previous, current);
            }
            previous = current;
            fillBand = !fillBand;
        }
        double end = axis.getUpperBound();
        if (fillBand) {
            getRenderer().fillRangeGridBand(g2, this, axis, dataArea,
                    previous, end);
        }
    }
}
项目:PI    文件:FastScatterPlot.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.
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea,
                                   List ticks) {

    // draw the domain grid lines, if the flag says they're visible...
    if (isDomainGridlinesVisible()) {
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double v = this.domainAxis.valueToJava2D(tick.getValue(),
                    dataArea, RectangleEdge.BOTTOM);
            Line2D line = new Line2D.Double(v, dataArea.getMinY(), v,
                    dataArea.getMaxY());
            g2.setPaint(getDomainGridlinePaint());
            g2.setStroke(getDomainGridlineStroke());
            g2.draw(line);
        }
    }
}
项目:PI    文件:FastScatterPlot.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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea,
                                  List ticks) {

    // draw the range grid lines, if the flag says they're visible...
    if (isRangeGridlinesVisible()) {
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double v = this.rangeAxis.valueToJava2D(tick.getValue(),
                    dataArea, RectangleEdge.LEFT);
            Line2D line = new Line2D.Double(dataArea.getMinX(), v,
                    dataArea.getMaxX(), v);
            g2.setPaint(getRangeGridlinePaint());
            g2.setStroke(getRangeGridlineStroke());
            g2.draw(line);
        }
    }

}
项目:nabs    文件: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.
 */
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()) {
        Stroke gridStroke = getDomainGridlineStroke();
        Paint gridPaint = getDomainGridlinePaint();
        if ((gridStroke != null) && (gridPaint != null)) {
            Iterator iterator = ticks.iterator();
            while (iterator.hasNext()) {
                ValueTick tick = (ValueTick) iterator.next();
                getRenderer().drawDomainGridLine(g2, this, getDomainAxis(),
                        dataArea, tick.getValue());
            }
        }
    }
}
项目:nabs    文件:FastScatterPlot.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.
 */
protected void drawDomainGridlines(Graphics2D g2, Rectangle2D dataArea, 
                                   List ticks) {

    // draw the domain grid lines, if the flag says they're visible...
    if (isDomainGridlinesVisible()) {
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double v = this.domainAxis.valueToJava2D(tick.getValue(), 
                    dataArea, RectangleEdge.BOTTOM);
            Line2D line = new Line2D.Double(v, dataArea.getMinY(), v, 
                    dataArea.getMaxY());
            g2.setPaint(getDomainGridlinePaint());
            g2.setStroke(getDomainGridlineStroke());
            g2.draw(line);                
        }
    }
}
项目:nabs    文件:FastScatterPlot.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.
 */
protected void drawRangeGridlines(Graphics2D g2, Rectangle2D dataArea, 
                                  List ticks) {

    // draw the range grid lines, if the flag says they're visible...
    if (isRangeGridlinesVisible()) {
        Iterator iterator = ticks.iterator();
        while (iterator.hasNext()) {
            ValueTick tick = (ValueTick) iterator.next();
            double v = this.rangeAxis.valueToJava2D(tick.getValue(), 
                    dataArea, RectangleEdge.LEFT);
            Line2D line = new Line2D.Double(dataArea.getMinX(), v, 
                    dataArea.getMaxX(), v);
            g2.setPaint(getRangeGridlinePaint());
            g2.setStroke(getRangeGridlineStroke());
            g2.draw(line);                
        }
    }

}