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

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

?? cyclicxyitemrenderer.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? 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.]
 *
 * ---------------------------
 * CyclicXYItemRenderer.java
 * ---------------------------
 * (C) Copyright 2003, 2004, by Nicolas Brodu and Contributors.
 *
 * Original Author:  Nicolas Brodu;
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *
 * $Id: CyclicXYItemRenderer.java,v 1.4.2.1 2005/10/25 20:56:21 mungady Exp $
 *
 * Changes
 * -------
 * 19-Nov-2003 : Initial import to JFreeChart from the JSynoptic project (NB);
 * 23-Dec-2003 : Added missing Javadocs (DG);
 * 25-Feb-2004 : Replaced CrosshairInfo with CrosshairState (DG);
 * 15-Jul-2004 : Switched getX() with getXValue() and getY() with 
 *               getYValue() (DG);
 * 
 */

package org.jfree.chart.renderer.xy;

import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;

import org.jfree.chart.axis.CyclicNumberAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.labels.XYToolTipGenerator;
import org.jfree.chart.plot.CrosshairState;
import org.jfree.chart.plot.PlotRenderingInfo;
import org.jfree.chart.plot.XYPlot;
import org.jfree.chart.urls.XYURLGenerator;
import org.jfree.data.DomainOrder;
import org.jfree.data.general.DatasetChangeListener;
import org.jfree.data.general.DatasetGroup;
import org.jfree.data.xy.XYDataset;

/**
 * The Cyclic XY item renderer is specially designed to handle cyclic axis. 
 * While the standard renderer would draw a line across the plot when a cycling 
 * occurs, the cyclic renderer splits the line at each cycle end instead. This 
 * is done by interpolating new points at cycle boundary. Thus, correct 
 * appearance is restored. 
 * 
 * The Cyclic XY item renderer works exactly like a standard XY item renderer 
 * with non-cyclic axis. 
 *
 * @author Nicolas Brodu
 */
public class CyclicXYItemRenderer extends StandardXYItemRenderer 
                                  implements Serializable {

    /** For serialization. */
    private static final long serialVersionUID = 4035912243303764892L;
    
    /**
     * Default constructor.
     */
    public CyclicXYItemRenderer() {
        super();
    }

    /**
     * Creates a new renderer.
     * 
     * @param type  the renderer type.
     */
    public CyclicXYItemRenderer(int type) {
        super(type);
    }

    /**
     * Creates a new renderer.
     * 
     * @param type  the renderer type.
     * @param labelGenerator  the tooltip generator.
     */
    public CyclicXYItemRenderer(int type, XYToolTipGenerator labelGenerator) {
        super(type, labelGenerator);
    }

    /**
     * Creates a new renderer.
     * 
     * @param type  the renderer type.
     * @param labelGenerator  the tooltip generator.
     * @param urlGenerator  the url generator.
     */
    public CyclicXYItemRenderer(int type, 
                                XYToolTipGenerator labelGenerator,
                                XYURLGenerator urlGenerator) {
        super(type, labelGenerator, urlGenerator);
    }

    
    /** 
     * Draws the visual representation of a single data item.
     * When using cyclic axis, do not draw a line from right to left when 
     * cycling as would a standard XY item renderer, but instead draw a line 
     * from the previous point to the cycle bound in the last cycle, and a line
     * from the cycle bound to current point in the current cycle.  
     * 
     * @param g2  the graphics device.
     * @param state  the renderer state.
     * @param dataArea  the data area.
     * @param info  the plot rendering info.
     * @param plot  the plot.
     * @param domainAxis  the domain axis.
     * @param rangeAxis  the range axis.
     * @param dataset  the dataset.
     * @param series  the series index.
     * @param item  the item index.
     * @param crosshairState  crosshair information for the plot 
     *                        (<code>null</code> permitted).
     * @param pass  the current 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) {

        if ((!getPlotLines()) || ((!(domainAxis instanceof CyclicNumberAxis)) 
                && (!(rangeAxis instanceof CyclicNumberAxis))) || (item <= 0)) {
            super.drawItem(
                g2, state, dataArea, info, plot, domainAxis, rangeAxis, 
                dataset, series, item, 
                crosshairState, pass
            );
            return;
        }

        // get the previous data point...
        Number xn = dataset.getX(series, item - 1);
        Number yn = dataset.getY(series, item - 1);
        // If null, don't draw line => then delegate to parent
        if (yn == null || xn == null) {
            super.drawItem(
                g2, state, dataArea, info, plot, domainAxis, rangeAxis, 
                dataset, series, item, 
                crosshairState, pass
            );
            return;
        }
        double[] x = new double[2];
        double[] y = new double[2];
        x[0] = xn.doubleValue();
        y[0] = yn.doubleValue();
        
        // get the data point...
        xn = dataset.getX(series, item);
        yn = dataset.getY(series, item);
        // If null, don't draw line at all
        if (yn == null || xn == null) {
            return;
        }
        x[1] = xn.doubleValue();
        y[1] = yn.doubleValue();

        // Now split the segment as needed
        double xcycleBound = Double.NaN;
        double ycycleBound = Double.NaN;
        boolean xBoundMapping = false, yBoundMapping = false;
        CyclicNumberAxis cnax = null, cnay = null;

        if (domainAxis instanceof CyclicNumberAxis) {
            cnax = (CyclicNumberAxis) domainAxis;
            xcycleBound = cnax.getCycleBound();
            xBoundMapping = cnax.isBoundMappedToLastCycle();
            // If the segment must be splitted, insert a new point
            // Strict test forces to have real segments (not 2 equal points) 
            // and avoids division by 0 
            if ((x[0] != x[1]) 
                    && ((xcycleBound >= x[0]) 
                    && (xcycleBound <= x[1]) 
                    || (xcycleBound >= x[1]) 
                    && (xcycleBound <= x[0]))) {
                double[] nx = new double[3];
                double[] ny = new double[3];
                nx[0] = x[0]; nx[2] = x[1]; ny[0] = y[0]; ny[2] = y[1];
                nx[1] = xcycleBound;
                ny[1] = (y[1] - y[0]) * (xcycleBound - x[0]) 
                        / (x[1] - x[0]) + y[0];
                x = nx; y = ny;
            }
        }

        if (rangeAxis instanceof CyclicNumberAxis) {
            cnay = (CyclicNumberAxis) rangeAxis;
            ycycleBound = cnay.getCycleBound();
            yBoundMapping = cnay.isBoundMappedToLastCycle();
            // The split may occur in either x splitted segments, if any, but 
            // not in both
            if ((y[0] != y[1]) && ((ycycleBound >= y[0]) 
                    && (ycycleBound <= y[1]) 
                    || (ycycleBound >= y[1]) && (ycycleBound <= y[0]))) {
                double[] nx = new double[x.length + 1];
                double[] ny = new double[y.length + 1];
                nx[0] = x[0]; nx[2] = x[1]; ny[0] = y[0]; ny[2] = y[1];
                ny[1] = ycycleBound;
                nx[1] = (x[1] - x[0]) * (ycycleBound - y[0]) 
                        / (y[1] - y[0]) + x[0];
                if (x.length == 3) { 
                    nx[3] = x[2]; ny[3] = y[2]; 
                }
                x = nx; y = ny;
            }
            else if ((x.length == 3) && (y[1] != y[2]) && ((ycycleBound >= y[1])
                    && (ycycleBound <= y[2]) 
                    || (ycycleBound >= y[2]) && (ycycleBound <= y[1]))) {
                double[] nx = new double[4];
                double[] ny = new double[4];
                nx[0] = x[0]; nx[1] = x[1]; nx[3] = x[2]; 
                ny[0] = y[0]; ny[1] = y[1]; ny[3] = y[2];
                ny[2] = ycycleBound;
                nx[2] = (x[2] - x[1]) * (ycycleBound - y[1]) 
                        / (y[2] - y[1]) + x[1];
                x = nx; y = ny;
            }
        }
        
        // If the line is not wrapping, then parent is OK
        if (x.length == 2) {
            super.drawItem(
                g2, state, dataArea, info, plot, domainAxis, rangeAxis, dataset,
                series, item, crosshairState, pass
            );

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美三级在线播放| 亚洲欧美日韩在线| 亚洲三级电影网站| 久久精品理论片| 在线精品视频一区二区| 久久夜色精品国产欧美乱极品| 亚洲精品高清在线观看| 韩国欧美国产1区| 欧美群妇大交群中文字幕| 欧美国产日韩在线观看| 九色综合狠狠综合久久| 欧美日韩一区高清| 中文字幕在线不卡| 国产成人av影院| 日韩亚洲欧美在线观看| 亚洲国产精品欧美一二99| 成人国产视频在线观看| 久久久精品tv| 久久精品国产在热久久| 欧美日本一区二区三区| 亚洲欧美区自拍先锋| 99国产麻豆精品| 国产精品午夜在线观看| 国产精品资源在线观看| 欧美videossexotv100| 丝袜美腿一区二区三区| 欧美性三三影院| 亚洲精品国产视频| 色婷婷国产精品久久包臀| 中文字幕一区视频| 99久久99久久久精品齐齐| 国产精品乱码人人做人人爱| 国产麻豆精品95视频| 久久天天做天天爱综合色| 国内精品国产成人国产三级粉色 | 国产午夜三级一区二区三| 婷婷久久综合九色国产成人| 欧美性生交片4| 亚洲一线二线三线视频| 在线观看亚洲精品视频| 午夜精品一区二区三区免费视频 | 久久精品久久久精品美女| 日韩欧美久久久| 黄一区二区三区| 日本一区二区在线不卡| 不卡av电影在线播放| 亚洲三级久久久| 欧美乱妇23p| 久久99日本精品| 国产精品美日韩| 在线中文字幕一区| 三级久久三级久久久| 日韩欧美激情在线| 成人免费高清在线| 亚洲欧美色一区| 欧美一区二区三区日韩视频| 蜜桃av一区二区三区| 国产欧美日产一区| 欧美图片一区二区三区| 麻豆国产91在线播放| 欧美激情一二三区| 欧美网站大全在线观看| 精品一区二区日韩| 亚洲色欲色欲www在线观看| 欧美日韩中文另类| 国产久卡久卡久卡久卡视频精品| 国产精品女主播av| 欧美一区二区三区免费观看视频| 懂色av一区二区夜夜嗨| 午夜成人在线视频| 国产欧美一区二区三区网站| 在线观看91精品国产入口| 久久成人久久鬼色| 亚洲丝袜精品丝袜在线| 日韩午夜激情免费电影| 99久久精品久久久久久清纯| 奇米亚洲午夜久久精品| 亚洲欧洲国产日韩| 欧美电视剧在线观看完整版| 91麻豆免费在线观看| 九九国产精品视频| 怡红院av一区二区三区| 中文字幕+乱码+中文字幕一区| 欧美日韩在线直播| av一区二区三区| 激情图区综合网| 亚洲高清视频在线| 亚洲特级片在线| 国产欧美日韩精品在线| 欧美一区二区三区免费大片| 日本乱码高清不卡字幕| 粉嫩av亚洲一区二区图片| 日韩二区三区在线观看| 亚洲一区在线电影| 国产精品女主播在线观看| 欧美精品一区二区三区一线天视频 | 91浏览器打开| 国产v日产∨综合v精品视频| 免费日韩伦理电影| 日韩精品电影在线| 亚洲成人手机在线| 亚洲免费在线观看视频| 国产精品国产a级| 久久久久久久网| 日韩精品最新网址| 日韩精品一区二| 欧美va亚洲va在线观看蝴蝶网| 欧美日韩精品一区二区三区| 一本大道综合伊人精品热热| 成人激情午夜影院| 成人动漫在线一区| 99天天综合性| 色一情一乱一乱一91av| 一本久久精品一区二区| 色域天天综合网| 色婷婷激情综合| 欧美日韩综合在线免费观看| 欧美色图片你懂的| 91精品黄色片免费大全| 91麻豆精品国产91久久久| 在线不卡的av| 欧美成人a∨高清免费观看| 欧美刺激脚交jootjob| 日韩一二三四区| 国产欧美精品区一区二区三区| 国产精品欧美一区喷水| 亚洲免费电影在线| 一区二区成人在线视频| 亚洲va欧美va人人爽| 蜜臀av性久久久久蜜臀aⅴ四虎| 九色综合狠狠综合久久| 国产suv精品一区二区三区| 成人在线综合网| 色综合久久综合网| 欧美另类久久久品| 欧美精品一区二区三区蜜臀| 国产精品网站在线| 一区2区3区在线看| 午夜精品福利一区二区三区av| 久草这里只有精品视频| 成人精品一区二区三区四区 | 91精品国产美女浴室洗澡无遮挡| 日韩一区二区在线观看| 久久精品亚洲精品国产欧美 | 色国产精品一区在线观看| 欧美人妖巨大在线| 国产日韩欧美精品一区| 一区二区三区四区国产精品| 免费成人美女在线观看| 丁香婷婷综合激情五月色| 欧美午夜电影一区| 久久午夜免费电影| 午夜欧美2019年伦理| 成人午夜在线视频| 91精品欧美综合在线观看最新| 精品对白一区国产伦| 亚洲精品成a人| 韩国中文字幕2020精品| 欧美性一区二区| 日本一区二区三区久久久久久久久不| 亚洲激情成人在线| 国产一区啦啦啦在线观看| 91国偷自产一区二区三区成为亚洲经典 | 久久综合九色综合97婷婷女人 | 中文字幕中文字幕中文字幕亚洲无线 | 美女精品一区二区| 91美女蜜桃在线| 国产午夜亚洲精品理论片色戒| 亚洲gay无套男同| 成人激情黄色小说| 日韩女优毛片在线| 亚洲一区二区3| 成人av免费在线| www欧美成人18+| 美洲天堂一区二卡三卡四卡视频 | 欧美一级高清片| 亚洲香肠在线观看| 成人爽a毛片一区二区免费| 欧美不卡视频一区| 日韩一区精品视频| 欧美午夜免费电影| 亚洲精品视频一区二区| 成人av电影免费在线播放| 久久久久久久综合| 狠狠色综合播放一区二区| 91精品国产一区二区三区蜜臀 | 中文字幕中文字幕一区二区| 国产在线一区二区综合免费视频| 欧美日韩一区久久| 亚洲一区在线电影| 欧美熟乱第一页| 亚洲国产精品久久艾草纯爱| 色综合久久久久| 亚洲精品久久久久久国产精华液| 99精品偷自拍| 国产精品大尺度| 色综合久久中文综合久久97 | 色天天综合色天天久久| 亚洲欧洲无码一区二区三区| 成人三级伦理片|