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

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

?? xyboxandwhiskerrenderer.java

?? jfreechart1.0.1 jsp繪制圖表的開發包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* ===========================================================
 * 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.]
 *
 * ----------------------------
 * XYBoxAndWhiskerRenderer.java
 * ----------------------------
 * (C) Copyright 2003, 2004, by David Browning and Contributors.
 *
 * Original Author:  David Browning (for Australian Institute of Marine 
 *                   Science);
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *
 * $Id: XYBoxAndWhiskerRenderer.java,v 1.6.2.3 2005/10/25 20:56:21 mungady Exp $
 *
 * Changes
 * -------
 * 05-Aug-2003 : Version 1, contributed by David Browning.  Based on code in the
 *               CandlestickRenderer class.  Additional modifications by David 
 *               Gilbert to make the code work with 0.9.10 changes (DG);
 * 08-Aug-2003 : Updated some of the Javadoc
 *               Allowed BoxAndwhiskerDataset Average value to be null - the 
 *               average value is an AIMS requirement
 *               Allow the outlier and farout coefficients to be set - though 
 *               at the moment this only affects the calculation of farouts.
 *               Added artifactPaint variable and setter/getter
 * 12-Aug-2003   Rewrote code to sort out and process outliers to take 
 *               advantage of changes in DefaultBoxAndWhiskerDataset
 *               Added a limit of 10% for width of box should no width be 
 *               specified...maybe this should be setable???
 * 20-Aug-2003 : Implemented Cloneable and PublicCloneable (DG);
 * 08-Sep-2003 : Changed ValueAxis API (DG);
 * 16-Sep-2003 : Changed ChartRenderingInfo --> PlotRenderingInfo (DG);
 * 25-Feb-2004 : Replaced CrosshairInfo with CrosshairState (DG);
 * 23-Apr-2004 : Added fillBox attribute, extended equals() method and fixed 
 *               serialization issue (DG);
 * 29-Apr-2004 : Fixed problem with drawing upper and lower shadows - bug id 
 *               944011 (DG);
 * 15-Jul-2004 : Switched getX() with getXValue() and getY() with 
 *               getYValue() (DG);
 * 01-Oct-2004 : Renamed 'paint' --> 'boxPaint' to avoid conflict with 
 *               inherited attribute (DG);
 * 10-Jun-2005 : Updated equals() to handle GradientPaint (DG);
 * 06-Oct-2005 : Removed setPaint() call in drawItem(), it is causing a 
 *               loop (DG);
 *
 * DO NOT USE drawHorizontalItem() - IT IS INCOMPLETE
 * TO EXPERIMENT, USE drawVerticalItem()
 */

package org.jfree.chart.renderer.xy;

import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Shape;
import java.awt.Stroke;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.entity.EntityCollection;
import org.jfree.chart.entity.XYItemEntity;
import org.jfree.chart.event.RendererChangeEvent;
import org.jfree.chart.labels.BoxAndWhiskerXYToolTipGenerator;
import org.jfree.chart.labels.XYToolTipGenerator;
import org.jfree.chart.plot.CrosshairState;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.PlotRenderingInfo;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.renderer.Outlier;
import org.jfree.chart.renderer.OutlierList;
import org.jfree.chart.renderer.OutlierListCollection;
import org.jfree.data.statistics.BoxAndWhiskerXYDataset;
import org.jfree.data.xy.XYDataset;
import org.jfree.io.SerialUtilities;
import org.jfree.ui.RectangleEdge;
import org.jfree.util.PaintUtilities;
import org.jfree.util.PublicCloneable;

/**
 * A renderer that draws box-and-whisker items on an {@link XYPlot}.  This 
 * renderer requires a {@link BoxAndWhiskerXYDataset}).
 * <P>
 * This renderer does not include any code to calculate the crosshair point.
 *
 * @author David Browning
 */
public class XYBoxAndWhiskerRenderer extends AbstractXYItemRenderer 
                                     implements XYItemRenderer, 
                                                Cloneable,
                                                PublicCloneable,
                                                Serializable {

    /** For serialization. */
    private static final long serialVersionUID = -8020170108532232324L;
    
    /** The box width. */
    private double boxWidth;

    /** The paint used to fill the box. */
    private transient Paint boxPaint;

    /** A flag that controls whether or not the box is filled. */
    private boolean fillBox;
    
    /** 
     * The paint used to draw various artifacts such as outliers, farout 
     * symbol, average ellipse and median line. 
     */
    private transient Paint artifactPaint = Color.black;

    /**
     * Creates a new renderer for box and whisker charts.
     */
    public XYBoxAndWhiskerRenderer() {
        this(-1.0);
    }

    /**
     * Creates a new renderer for box and whisker charts.
     * <P>
     * Use -1 for the box width if you prefer the width to be calculated 
     * automatically.
     *
     * @param boxWidth  the box width.
     */
    public XYBoxAndWhiskerRenderer(double boxWidth) {
        super();
        this.boxWidth = boxWidth;
        this.boxPaint = Color.green;
        this.fillBox = true;
        setToolTipGenerator(new BoxAndWhiskerXYToolTipGenerator());
    }

    /**
     * Returns the width of each box.
     *
     * @return The box width.
     */
    public double getBoxWidth() {
        return this.boxWidth;
    }

    /**
     * Sets the box width.
     * <P>
     * If you set the width to a negative value, the renderer will calculate
     * the box width automatically based on the space available on the chart.
     *
     * @param width  the width.
     */
    public void setBoxWidth(double width) {
        if (width != this.boxWidth) {
            this.boxWidth = width;
            notifyListeners(new RendererChangeEvent(this));
        }
    }

    /**
     * Returns the paint used to fill boxes.
     *
     * @return The paint (possibly <code>null</code>).
     */
    public Paint getBoxPaint() {
        return this.boxPaint;
    }

    /**
     * Sets the paint used to fill boxes and sends a {@link RendererChangeEvent}
     * to all registered listeners.
     *
     * @param paint  the paint (<code>null</code> permitted).
     */
    public void setBoxPaint(Paint paint) {
        this.boxPaint = paint;
        notifyListeners(new RendererChangeEvent(this));
    }
    
    /**
     * Returns the flag that controls whether or not the box is filled.
     * 
     * @return A boolean.
     */
    public boolean getFillBox() {
        return this.fillBox;   
    }
    
    /**
     * Sets the flag that controls whether or not the box is filled and sends a 
     * {@link RendererChangeEvent} to all registered listeners.
     * 
     * @param flag  the flag.
     */
    public void setFillBox(boolean flag) {
        this.fillBox = flag;
        notifyListeners(new RendererChangeEvent(this));
    }

    /**
     * Returns the paint used to paint the various artifacts such as outliers, 
     * farout symbol, median line and the averages ellipse.
     *
     * @return The paint.
     */
    public Paint getArtifactPaint() {
        return this.artifactPaint;
    }

    /**
     * Sets the paint used to paint the various artifacts such as outliers, 
     * farout symbol, median line and the averages ellipse.
     * 
     * @param artifactPaint  the paint.
     */
    public void setArtifactPaint(Paint artifactPaint) {
        this.artifactPaint = artifactPaint;
    }

    /**
     * Draws the visual representation of a single data item.
     *
     * @param g2  the graphics device.
     * @param state  the renderer state.
     * @param dataArea  the area within which the plot is being drawn.
     * @param info  collects info about the drawing.
     * @param plot  the plot (can be used to obtain standard color 
     *              information etc).
     * @param domainAxis  the domain axis.
     * @param rangeAxis  the range axis.
     * @param dataset  the dataset.
     * @param series  the series index (zero-based).
     * @param item  the item index (zero-based).
     * @param crosshairState  crosshair information for the plot 
     *                        (<code>null</code> permitted).
     * @param pass  the pass index.
     */
    public void drawItem(Graphics2D g2, 
                         XYItemRendererState state,
                         Rectangle2D dataArea,
                         PlotRenderingInfo info,
                         XYPlot plot, 
                         ValueAxis domainAxis, 
                         ValueAxis rangeAxis,
                         XYDataset dataset, 
                         int series, 
                         int item,
                         CrosshairState crosshairState,
                         int pass) {

        PlotOrientation orientation = plot.getOrientation();

        if (orientation == PlotOrientation.HORIZONTAL) {
            drawHorizontalItem(
                g2, dataArea, info, plot, domainAxis, rangeAxis,
                dataset, series, item, crosshairState, pass
            );
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            drawVerticalItem(
                g2, dataArea, info, plot, domainAxis, rangeAxis,
                dataset, series, item, crosshairState, pass
            );
        }

    }

    /**
     * Draws the visual representation of a single data item.
     *
     * @param g2  the graphics device.
     * @param dataArea  the area within which the plot is being drawn.
     * @param info  collects info about the drawing.
     * @param plot  the plot (can be used to obtain standard color 
     *              information etc).
     * @param domainAxis  the domain axis.
     * @param rangeAxis  the range axis.
     * @param dataset  the dataset.
     * @param series  the series index (zero-based).
     * @param item  the item index (zero-based).
     * @param crosshairState  crosshair information for the plot 
     *                        (<code>null</code> permitted).
     * @param pass  the pass index.
     */
    public void drawHorizontalItem(Graphics2D g2, 
                                   Rectangle2D dataArea,
                                   PlotRenderingInfo info,
                                   XYPlot plot, 
                                   ValueAxis domainAxis, 
                                   ValueAxis rangeAxis,
                                   XYDataset dataset, 
                                   int series, 
                                   int item,
                                   CrosshairState crosshairState,
                                   int pass) {

        // setup for collecting optional entity info...
        EntityCollection entities = null;
        if (info != null) {
            entities = info.getOwner().getEntityCollection();
        }

        BoxAndWhiskerXYDataset boxAndWhiskerData 
            = (BoxAndWhiskerXYDataset) dataset;

        Number x = boxAndWhiskerData.getX(series, item);
        Number yMax = boxAndWhiskerData.getMaxRegularValue(series, item);
        Number yMin = boxAndWhiskerData.getMinRegularValue(series, item);
        Number yQ1Median = boxAndWhiskerData.getQ1Value(series, item);
        Number yQ3Median = boxAndWhiskerData.getQ3Value(series, item);

        double xx = domainAxis.valueToJava2D(
            x.doubleValue(), dataArea, plot.getDomainAxisEdge()
        );

        RectangleEdge location = plot.getRangeAxisEdge();
        double yyMax = rangeAxis.valueToJava2D(
            yMax.doubleValue(), dataArea, location
        );
        double yyMin = rangeAxis.valueToJava2D(
            yMin.doubleValue(), dataArea, location
        );

        double yyQ1Median = rangeAxis.valueToJava2D(
            yQ1Median.doubleValue(), dataArea, location
        );
        double yyQ3Median = rangeAxis.valueToJava2D(
            yQ3Median.doubleValue(), dataArea, location
        );

        double exactCandleWidth = getBoxWidth();
        double thisCandleWidth = exactCandleWidth;
        if (exactCandleWidth <= 0.0) {
            int itemCount = boxAndWhiskerData.getItemCount(series);
            exactCandleWidth = (dataArea.getHeight()) / itemCount * 4.5 / 7;
            if (exactCandleWidth < 1) {
                exactCandleWidth = 1;
            }
            thisCandleWidth = exactCandleWidth;
            if (thisCandleWidth < 3) {
                thisCandleWidth = 3;
            }
        }

        Stroke s = getItemStroke(series, item);

        g2.setStroke(s);

        // draw the upper shadow
        if ((yyMax > yyQ1Median) && (yyMax > yyQ3Median)) {
            g2.draw(
                new Line2D.Double(yyMax, xx, Math.max(yyQ1Median, yyQ3Median), 
                        xx)
            );
        }

        // draw the lower shadow
        if ((yyMin < yyQ1Median) && (yyMin < yyQ3Median)) {
            g2.draw(
                new Line2D.Double(yyMin, xx, Math.min(yyQ1Median, yyQ3Median), 
                        xx)
            );
        }


        // draw the body
        Shape box = null;
        if (yyQ1Median < yyQ3Median) {
            box = new Rectangle2D.Double(
                yyQ1Median, xx - thisCandleWidth / 2, yyQ3Median - yyQ1Median, 
                thisCandleWidth
            );
        }
        else {
            box = new Rectangle2D.Double(
                yyQ3Median, xx - thisCandleWidth / 2, yyQ1Median - yyQ3Median, 
                thisCandleWidth

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区高清| 欧美videofree性高清杂交| 麻豆国产一区二区| 亚洲男同性恋视频| 久久日韩精品一区二区五区| 日本高清不卡aⅴ免费网站| 国产一区不卡在线| 日韩av一级片| 亚洲成人av福利| 亚洲乱码国产乱码精品精可以看 | 精品一区中文字幕| 亚洲精品成人精品456| 国产视频一区二区在线观看| 制服丝袜av成人在线看| 欧美在线制服丝袜| 色综合久久综合网欧美综合网| 狠狠网亚洲精品| 日本va欧美va精品| 午夜a成v人精品| 夜夜嗨av一区二区三区四季av| 亚洲欧洲美洲综合色网| 国产精品乱码人人做人人爱| 久久久久久久久岛国免费| 日韩欧美国产系列| 日韩女优av电影| 91精品欧美久久久久久动漫| 精品婷婷伊人一区三区三| 色综合久久66| 欧美在线观看18| 欧美在线一二三| 欧美性猛交xxxxxxxx| 一本久道久久综合中文字幕 | 高清在线观看日韩| 国产盗摄精品一区二区三区在线| 九九精品一区二区| 国产中文一区二区三区| 国产美女视频一区| 国产乱码精品一区二区三区av| 极品少妇xxxx偷拍精品少妇| 国产在线不卡一卡二卡三卡四卡| 免费成人性网站| 激情六月婷婷久久| 国产99久久久国产精品免费看| 高清视频一区二区| 99久久精品国产导航| aaa欧美色吧激情视频| 色偷偷久久人人79超碰人人澡| va亚洲va日韩不卡在线观看| 91香蕉国产在线观看软件| 日本高清不卡视频| 欧美一级高清大全免费观看| 精品久久国产老人久久综合| 久久久久亚洲综合| 中文字幕综合网| 午夜精品视频一区| 久久国产免费看| 成人黄页在线观看| 欧亚洲嫩模精品一区三区| 制服丝袜中文字幕一区| 久久免费美女视频| 亚洲欧美一区二区三区久本道91| 一区二区免费看| 欧美a一区二区| 粉嫩av一区二区三区| 欧美综合在线视频| 精品区一区二区| 中文字幕日韩一区二区| 亚洲午夜一区二区三区| 久久99国产精品久久99| 94-欧美-setu| 日韩欧美国产系列| 日韩美女视频一区二区 | 成人欧美一区二区三区在线播放| 一区二区三区日韩| 麻豆精品在线视频| 99久久久久免费精品国产| 欧美日本精品一区二区三区| 精品久久五月天| 亚洲欧美一区二区久久| 久久99国产精品免费| 色一区在线观看| 亚洲精品在线网站| 亚洲综合小说图片| 国产成人av福利| 欧美精品国产精品| 国产精品黄色在线观看 | 色综合久久综合| 欧美成人精品二区三区99精品| 国产精品久久久久久久久动漫| 亚瑟在线精品视频| 成人中文字幕电影| 日韩一级片网址| 亚洲综合一区二区精品导航| 国产成人在线视频网站| 51精品秘密在线观看| 18成人在线视频| 国产福利一区二区三区视频在线 | 欧美日韩专区在线| 国产精品无人区| 美女精品自拍一二三四| 在线精品国精品国产尤物884a| 久久在线免费观看| 日韩中文字幕一区二区三区| 91在线小视频| 国产精品视频你懂的| 激情久久五月天| 91精品国产麻豆| 亚洲线精品一区二区三区八戒| www.久久精品| 国产肉丝袜一区二区| 激情伊人五月天久久综合| 欧美久久免费观看| 一区二区三区四区亚洲| 成人av电影免费在线播放| 久久精品夜色噜噜亚洲aⅴ| 蜜桃视频免费观看一区| 在线电影院国产精品| 亚洲综合在线视频| 日本精品视频一区二区三区| 亚洲欧美在线观看| av亚洲精华国产精华| 中文字幕一区二区5566日韩| 成人美女在线视频| 国产精品丝袜在线| 成人国产亚洲欧美成人综合网| 久久久99免费| 国产乱人伦精品一区二区在线观看 | 亚洲品质自拍视频网站| 成人av在线播放网站| 国产精品每日更新在线播放网址| 国产精一品亚洲二区在线视频| 久久网这里都是精品| 国产资源在线一区| 欧美激情综合五月色丁香| 国产a级毛片一区| 亚洲欧美综合色| 日本国产一区二区| 午夜精品国产更新| 91精品国产综合久久精品app| 亚洲超碰97人人做人人爱| 欧美日韩一区小说| 毛片av一区二区三区| 精品日韩成人av| 丁香六月久久综合狠狠色| 日本一区二区视频在线| 懂色av一区二区三区蜜臀| 国产精品女主播在线观看| av亚洲精华国产精华精华| 亚洲欧美电影院| 欧美精品精品一区| 韩国三级在线一区| 国产精品女同互慰在线看| 一本色道久久综合亚洲91| 婷婷综合另类小说色区| 精品欧美乱码久久久久久| 国产成人精品午夜视频免费| 国产精品第五页| 欧美日韩一区高清| 精东粉嫩av免费一区二区三区| 中文字幕精品一区二区精品绿巨人 | 国内精品不卡在线| 国产精品国产三级国产普通话三级 | 亚洲色图视频免费播放| 欧美日韩综合在线免费观看| 九九精品视频在线看| 亚洲天堂久久久久久久| 7777精品伊人久久久大香线蕉的| 精品一区二区三区蜜桃| 中文字幕亚洲在| 日韩一区二区电影网| 大陆成人av片| 日产国产欧美视频一区精品| 国产视频不卡一区| 欧美日韩一级二级三级| 国产精品白丝jk黑袜喷水| 亚洲一区二区在线免费看| 亚洲精品一区在线观看| 99re视频这里只有精品| 欧美aaa在线| 亚洲色图视频网| 久久先锋影音av鲁色资源网| 色婷婷久久久综合中文字幕| 欧美中文一区二区三区| 国模冰冰炮一区二区| 依依成人精品视频| 久久久久久电影| 91麻豆精品国产自产在线| www.欧美.com| 久久精品国产999大香线蕉| 一区二区在线观看不卡| 久久午夜电影网| 欧美精品粉嫩高潮一区二区| www.在线欧美| 九九视频精品免费| 丝袜亚洲另类丝袜在线| 亚洲婷婷综合久久一本伊一区| 久久无码av三级| 日韩一区二区三区在线观看| 91啪亚洲精品| 成人免费av在线|