亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? statisticallineandshaperenderer.java

?? jfreechart1.0.1 jsp繪制圖表的開發包
?? JAVA
字號:
/* ===========================================================
 * JFreeChart : a free chart library for the Java(tm) platform
 * ===========================================================
 *
 * (C) Copyright 2000-2005, by Object Refinery Limited and Contributors.
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 *
 * This library is free software; you can redistribute it and/or modify it 
 * under the terms of the GNU Lesser General Public License as published by 
 * the Free Software Foundation; either version 2.1 of the License, or 
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful, but 
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 
 * License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, 
 * USA.  
 *
 * [Java is a trademark or registered trademark of Sun Microsystems, Inc. 
 * in the United States and other countries.]
 * 
 * ------------------------------------
 * StatisticalLineAndShapeRenderer.java
 * ------------------------------------
 * (C) Copyright 2005, by Object Refinery Limited and Contributors.
 *
 * Original Author:  Mofeed Shahin;
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *
 * $Id: StatisticalLineAndShapeRenderer.java,v 1.4.2.5 2005/12/02 10:40:17 mungady Exp $
 *
 * Changes
 * -------
 * 01-Feb-2005 : Version 1, contributed by Mofeed Shahin (DG);
 * 16-Jun-2005 : Added errorIndicatorPaint to be consistent with 
 *               StatisticalBarRenderer (DG);
 *  
 */

package org.jfree.chart.renderer.category;

import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Shape;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.entity.CategoryItemEntity;
import org.jfree.chart.entity.EntityCollection;
import org.jfree.chart.event.RendererChangeEvent;
import org.jfree.chart.labels.CategoryToolTipGenerator;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.CategoryDataset;
import org.jfree.data.statistics.StatisticalCategoryDataset;
import org.jfree.io.SerialUtilities;
import org.jfree.ui.RectangleEdge;
import org.jfree.util.PaintUtilities;
import org.jfree.util.PublicCloneable;
import org.jfree.util.ShapeUtilities;

/**
 * A renderer that draws shapes for each data item, and lines between data 
 * items.  Each point has a mean value and a standard deviation line. For use 
 * with the {@link CategoryPlot} class.
 */
public class StatisticalLineAndShapeRenderer extends LineAndShapeRenderer 
    implements Cloneable, PublicCloneable, Serializable {

    /** For serialization. */
    private static final long serialVersionUID = -3557517173697777579L;
    
    /** The paint used to show the error indicator. */
    private transient Paint errorIndicatorPaint;

    /**
     * Constructs a default renderer (draws shapes and lines).
     */
    public StatisticalLineAndShapeRenderer() {
        this(true, true);
    }

    /**
     * Constructs a new renderer.
     * 
     * @param linesVisible  draw lines?
     * @param shapesVisible  draw shapes?
     */
    public StatisticalLineAndShapeRenderer(boolean linesVisible, 
                                           boolean shapesVisible) {
        super(true, true);
        this.errorIndicatorPaint = null;
    }

    /**
     * Returns the paint used for the error indicators.
     * 
     * @return The paint used for the error indicators (possibly 
     *         <code>null</code>).
     */
    public Paint getErrorIndicatorPaint() {
        return this.errorIndicatorPaint;   
    }

    /**
     * Sets the paint used for the error indicators (if <code>null</code>, 
     * the item outline paint is used instead)
     * 
     * @param paint  the paint (<code>null</code> permitted).
     */
    public void setErrorIndicatorPaint(Paint paint) {
        this.errorIndicatorPaint = paint;
        notifyListeners(new RendererChangeEvent(this));
    }
    
    /**
     * Draw a single data item.
     *
     * @param g2  the graphics device.
     * @param state  the renderer state.
     * @param dataArea  the area in which the data is drawn.
     * @param plot  the plot.
     * @param domainAxis  the domain axis.
     * @param rangeAxis  the range axis.
     * @param dataset  the dataset.
     * @param row  the row index (zero-based).
     * @param column  the column index (zero-based).
     * @param pass  the pass.
     */
    public void drawItem(Graphics2D g2,
                         CategoryItemRendererState state,
                         Rectangle2D dataArea,
                         CategoryPlot plot,
                         CategoryAxis domainAxis,
                         ValueAxis rangeAxis,
                         CategoryDataset dataset,
                         int row,
                         int column,
                         int pass) {

        // nothing is drawn for null...
        Number v = dataset.getValue(row, column);
        if (v == null) {
          return;
        }

        StatisticalCategoryDataset statData 
            = (StatisticalCategoryDataset) dataset;

        Number meanValue = statData.getMeanValue(row, column);

        PlotOrientation orientation = plot.getOrientation();

        // current data point...
        double x1 = domainAxis.getCategoryMiddle(column, getColumnCount(), 
                dataArea, plot.getDomainAxisEdge());

        double y1 = rangeAxis.valueToJava2D(meanValue.doubleValue(), dataArea, 
                plot.getRangeAxisEdge());

        Shape shape = getItemShape(row, column);
        if (orientation == PlotOrientation.HORIZONTAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, y1, x1);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            shape = ShapeUtilities.createTranslatedShape(shape, x1, y1);
        }
        if (getItemShapeVisible(row, column)) {
            
            if (getItemShapeFilled(row, column)) {
                g2.setPaint(getItemPaint(row, column));
                g2.fill(shape);
            }
            else {
                if (getUseOutlinePaint()) {
                    g2.setPaint(getItemOutlinePaint(row, column));   
                }
                else {
                    g2.setPaint(getItemPaint(row, column));
                }
                g2.setStroke(getItemOutlineStroke(row, column));
                g2.draw(shape);
            }
        }

        if (getItemLineVisible(row, column)) {
            if (column != 0) {

                Number previousValue = statData.getValue(row, column - 1);
                if (previousValue != null) {

                    // previous data point...
                    double previous = previousValue.doubleValue();
                    double x0 = domainAxis.getCategoryMiddle(column - 1, 
                            getColumnCount(), dataArea, 
                            plot.getDomainAxisEdge());
                    double y0 = rangeAxis.valueToJava2D(previous, dataArea, 
                            plot.getRangeAxisEdge());

                    Line2D line = null;
                    if (orientation == PlotOrientation.HORIZONTAL) {
                        line = new Line2D.Double(y0, x0, y1, x1);
                    }
                    else if (orientation == PlotOrientation.VERTICAL) {
                        line = new Line2D.Double(x0, y0, x1, y1);
                    }
                    g2.setPaint(getItemPaint(row, column));
                    g2.setStroke(getItemStroke(row, column));
                    g2.draw(line);
                }
            }
        }

        RectangleEdge yAxisLocation = plot.getRangeAxisEdge();
        RectangleEdge xAxisLocation = plot.getDomainAxisEdge();
        double rectX = domainAxis.getCategoryStart(column, getColumnCount(), 
                dataArea, xAxisLocation);
        
        rectX = rectX + row * state.getBarWidth();
        
        g2.setPaint(getItemPaint(row, column));
        //standard deviation lines
        double valueDelta = statData.getStdDevValue(row, column).doubleValue(); 

        double highVal, lowVal;
        if ((meanValue.doubleValue() + valueDelta) 
                > rangeAxis.getRange().getUpperBound()) {
            highVal = rangeAxis.valueToJava2D(
                    rangeAxis.getRange().getUpperBound(), dataArea, 
                    yAxisLocation);
        }
        else {
            highVal = rangeAxis.valueToJava2D(meanValue.doubleValue() 
                    + valueDelta, dataArea, yAxisLocation);
        }
        
        if ((meanValue.doubleValue() + valueDelta) 
                < rangeAxis.getRange().getLowerBound()) {
            lowVal = rangeAxis.valueToJava2D(
                    rangeAxis.getRange().getLowerBound(), dataArea, 
                    yAxisLocation);
        }
        else {
            lowVal = rangeAxis.valueToJava2D(meanValue.doubleValue() 
                    - valueDelta, dataArea, yAxisLocation);
        }
        
        if (this.errorIndicatorPaint != null) {
            g2.setPaint(this.errorIndicatorPaint);  
        }
        else {
            g2.setPaint(getItemPaint(row, column));   
        }
        Line2D line = null;
        line = new Line2D.Double(x1, lowVal, x1, highVal);
        g2.draw(line);
        line = new Line2D.Double(x1 - 5.0d, highVal, x1 + 5.0d, highVal);
        g2.draw(line);
        line = new Line2D.Double(x1 - 5.0d, lowVal, x1 + 5.0d, lowVal);
        g2.draw(line);
        
        // draw the item label if there is one...
        if (isItemLabelVisible(row, column)) {
            if (orientation == PlotOrientation.HORIZONTAL) {
              drawItemLabel(g2, orientation, dataset, row, column, 
                  y1, x1, (meanValue.doubleValue() < 0.0));
            }
            else if (orientation == PlotOrientation.VERTICAL) {
              drawItemLabel(g2, orientation, dataset, row, column, 
                  x1, y1, (meanValue.doubleValue() < 0.0));                
            }
        }

        // collect entity and tool tip information...
        if (state.getInfo() != null) {
            EntityCollection entities = state.getEntityCollection();
            if (entities != null && shape != null) {
                String tip = null;
                CategoryToolTipGenerator tipster = getToolTipGenerator(row, 
                        column);
                if (tipster != null) {
                    tip = tipster.generateToolTip(dataset, row, column);
                }
                String url = null;
                if (getItemURLGenerator(row, column) != null) {
                    url = getItemURLGenerator(row, column).generateURL(
                            dataset, row, column);
                }
                CategoryItemEntity entity = new CategoryItemEntity(shape, tip, 
                        url, dataset, row, dataset.getColumnKey(column), 
                        column);
                entities.add(entity);

            }

        }

    }

    /**
     * Tests this renderer for equality with an arbitrary object.
     * 
     * @param obj  the object (<code>null</code> permitted).
     * 
     * @return A boolean.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;   
        }
        if (!(obj instanceof StatisticalLineAndShapeRenderer)) {
            return false;   
        }
        if (!super.equals(obj)) {
            return false;   
        }
        StatisticalLineAndShapeRenderer that 
            = (StatisticalLineAndShapeRenderer) obj;
        if (!PaintUtilities.equal(this.errorIndicatorPaint, 
                that.errorIndicatorPaint)) {
            return false;
        }
        return true;
    }
    
    /**
     * Provides serialization support.
     *
     * @param stream  the output stream.
     *
     * @throws IOException  if there is an I/O error.
     */
    private void writeObject(ObjectOutputStream stream) throws IOException {
        stream.defaultWriteObject();
        SerialUtilities.writePaint(this.errorIndicatorPaint, stream);
    }

    /**
     * Provides serialization support.
     *
     * @param stream  the input stream.
     *
     * @throws IOException  if there is an I/O error.
     * @throws ClassNotFoundException  if there is a classpath problem.
     */
    private void readObject(ObjectInputStream stream) 
        throws IOException, ClassNotFoundException {
        stream.defaultReadObject();
        this.errorIndicatorPaint = SerialUtilities.readPaint(stream);
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美经典视频| 人妖欧美一区二区| 69av一区二区三区| 成人午夜激情影院| 免费成人在线影院| 一区二区在线观看视频在线观看| 精品久久久久久亚洲综合网| 精品免费国产二区三区| 色呦呦一区二区三区| 亚洲福利一二三区| 欧美激情中文字幕| 欧美成人免费网站| 欧美区在线观看| a美女胸又www黄视频久久| 久久成人免费网站| 日日噜噜夜夜狠狠视频欧美人| 国产精品的网站| 久久综合色婷婷| 日韩一级片在线播放| 欧美性猛片xxxx免费看久爱 | 亚洲成人自拍一区| 中文字幕欧美一| 国产欧美一二三区| 久久久久久久久99精品| 日韩午夜激情av| 3d成人h动漫网站入口| 欧美写真视频网站| 国产欧美日韩亚州综合| 欧美sm极限捆绑bd| 日韩一区二区麻豆国产| 欧美精品日韩一本| 欧美日韩国产一级片| 欧美日韩中文国产| 欧美日韩激情在线| 884aa四虎影成人精品一区| 欧美丝袜丝nylons| 欧美色综合网站| 欧美美女一区二区三区| 欧美精品乱码久久久久久| 欧美午夜精品电影| 精品视频一区 二区 三区| 欧美色综合影院| 欧美日韩一本到| 制服丝袜成人动漫| 日韩精品一区二区三区视频在线观看| 欧美一级高清片在线观看| 欧美一区二区三区色| 欧美一区二区三区在线| 欧美电视剧在线看免费| 久久综合av免费| 亚洲国产精品黑人久久久| 国产精品日韩精品欧美在线| 国产精品久久久久国产精品日日| 亚洲欧美自拍偷拍色图| 一区二区三区日韩欧美| 香蕉久久一区二区不卡无毒影院| 日韩va欧美va亚洲va久久| 麻豆传媒一区二区三区| 国产乱子伦视频一区二区三区| 国产露脸91国语对白| 99精品偷自拍| 欧美精品久久99| www国产成人免费观看视频 深夜成人网| 国产亚洲精久久久久久| 亚洲毛片av在线| 日本欧美肥老太交大片| 国产一区欧美日韩| 91小视频在线观看| 91精品国产综合久久精品性色 | 国产午夜精品在线观看| 国产精品久久99| 亚洲电影欧美电影有声小说| 精品一区二区av| 成人avav影音| 9191久久久久久久久久久| 久久女同精品一区二区| 一区二区三区中文字幕| 美女视频第一区二区三区免费观看网站| 国产成人精品一区二区三区网站观看| 91麻豆精品在线观看| 日韩丝袜美女视频| 亚洲女同一区二区| 麻豆国产精品777777在线| 91丨porny丨蝌蚪视频| 欧美一个色资源| 18成人在线观看| 久久国产精品无码网站| 色欲综合视频天天天| 精品国产区一区| 亚洲精品欧美专区| 国产精品一区在线观看乱码| 欧美色图片你懂的| 国产精品系列在线| 日本欧美在线观看| 在线免费观看日本一区| 国产亚洲人成网站| 蜜臀久久99精品久久久久久9| eeuss鲁一区二区三区| 精品剧情在线观看| 亚洲国产日韩精品| 99久久精品国产精品久久| 日本亚洲欧美天堂免费| 91香蕉视频污| 国产喂奶挤奶一区二区三区| 日本aⅴ精品一区二区三区 | 日本免费新一区视频 | 日韩美一区二区三区| 亚洲美女少妇撒尿| 成人精品视频一区二区三区| 精品电影一区二区| 日韩va欧美va亚洲va久久| 欧美在线观看18| 国产精品国产精品国产专区不蜜| 加勒比av一区二区| 日韩一区二区在线观看| 五月婷婷久久丁香| 欧洲色大大久久| 亚洲青青青在线视频| 国产aⅴ综合色| 久久久久久久久岛国免费| 精品综合免费视频观看| 91精品国产色综合久久不卡蜜臀| 一区二区三区在线不卡| 91丨porny丨中文| 亚洲欧洲日产国码二区| 高清成人在线观看| 国产日韩欧美精品综合| 国产精品一区不卡| 国产欧美日韩三级| 福利一区二区在线观看| 国产校园另类小说区| 国产麻豆成人精品| 久久香蕉国产线看观看99| 狠狠久久亚洲欧美| 久久久一区二区| 国产高清亚洲一区| 日本一区二区三区在线观看| 国产v综合v亚洲欧| 国产精品视频看| 99久久er热在这里只有精品15 | 亚洲成a人在线观看| 欧美日韩高清一区二区| 日韩国产高清影视| 欧美tk丨vk视频| 国产精品综合一区二区三区| 亚洲国产成人在线| 91丨porny丨蝌蚪视频| 亚洲自拍另类综合| 欧美一区二区三区在线视频 | 久久精品国产免费| 久久蜜臀精品av| 成人禁用看黄a在线| 一区二区三区国产精华| 欧美精品18+| 激情综合色播五月| 中文久久乱码一区二区| 91免费看片在线观看| 婷婷亚洲久悠悠色悠在线播放| 欧美一区二区三区不卡| 国产综合成人久久大片91| 国产精品欧美精品| 一本大道久久a久久精品综合| 丝袜亚洲另类欧美| 久久久精品中文字幕麻豆发布| 成人免费看片app下载| gogo大胆日本视频一区| 亚洲成人自拍网| 久久亚洲捆绑美女| 91福利视频在线| 天堂在线亚洲视频| 中文字幕第一区二区| 欧美视频在线一区二区三区| 麻豆成人在线观看| 亚洲美女在线一区| 精品福利视频一区二区三区| 不卡一区二区三区四区| 丝袜美腿一区二区三区| 欧美国产国产综合| 在线播放视频一区| 成人性生交大合| 日欧美一区二区| 日韩伦理免费电影| 精品成a人在线观看| 色狠狠综合天天综合综合| 韩国精品在线观看| 亚洲成av人片在线观看无码| 国产欧美一区二区精品仙草咪| 欧美视频一区二区三区在线观看 | 国模娜娜一区二区三区| 亚洲精品v日韩精品| 国产亚洲一区字幕| 欧美日韩国产高清一区| 成人app在线| 精品一区二区三区不卡| 亚洲一区二区视频在线观看| 日本一区二区在线不卡| 欧美电视剧在线看免费| 欧美日韩专区在线| 91啪亚洲精品| 懂色av一区二区三区免费观看|