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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? periodmarkerplot.java

?? Web圖形化的Java庫
?? JAVA
字號:
/* ======================================
 * JFreeChart : a free Java chart library
 * ======================================
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 * Project Lead:  David Gilbert (david.gilbert@object-refinery.com);
 *
 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
 *
 * 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., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * ---------------------
 * PeriodMarkerPlot.java
 * ---------------------
 * (C) Copyright 2002, by Sylvain Vieujot and Contributors.
 *
 * Original Author:  Sylvain Vieujot;
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *                   Arnaud Lelievre;
 *
 * $Id: PeriodMarkerPlot.java,v 1.10 2003/09/08 22:08:02 mungady Exp $
 *
 * Changes
 * -------
 * 08-Jan-2002 : Version 1, thanks to SV.  Added parameter for tooltips so that the code will
 *               compile in the current development version - tooltips ignored at this point (DG);
 * 09-Apr-2002 : Removed empty version tag to eliminate Javadoc warning, and updated import
 *               statements (DG);
 * 23-Apr-2002 : Moved dataset from JFreeChart to Plot (DG);
 * 13-Jun-2002 : Removed commented out code (DG);
 * 25-Jun-2002 : Removed redundant import (DG);
 * 01-Oct-2002 : Fixed errors reported by Checkstyle (DG);
 * 08-Sep-2003 : Added internationalization via use of properties resourceBundle (RFE 690236) (AL); 
 *
 */

package org.jfree.chart.plot;

import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Graphics2D;
import java.awt.Insets;
import java.awt.Paint;
import java.awt.Shape;
import java.awt.geom.Rectangle2D;
import java.util.ResourceBundle;

import org.jfree.chart.ChartRenderingInfo;
import org.jfree.chart.LegendItemCollection;
import org.jfree.chart.axis.AxisSpace;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.renderer.AbstractRenderer;
import org.jfree.data.XYDataset;

/**
 * A plot that marks time periods, for use in overlaid plots.
 *
 * @author  sylvain
 */
public class PeriodMarkerPlot extends XYPlot implements ValueAxisPlot {

    /** The resourceBundle for the localization. */
    static protected ResourceBundle localizationResources = 
                            ResourceBundle.getBundle("org.jfree.chart.plot.LocalizationBundle");

    /**
     * Creates a new period marker plot.
     *
     * @param data  the data series.
     * @param domainAxis  the domain axis.
     * @param rangeAxis  the range axis.
     */
    public PeriodMarkerPlot(XYDataset data, ValueAxis domainAxis, ValueAxis rangeAxis) {
        super(data, domainAxis, rangeAxis, null);
    }

    /**
     * Returns the legend items (null for this plot).
     *
     * @return the legend items.
     */
    public LegendItemCollection getLegendItems() {
        return null;
    }

    /**
     * Returns the plot type as a string.
     *
     * @return <i>Period Marker Plot</i>.
     */
    public String getPlotType() {
          return localizationResources.getString("Period_Marker_Plot");
    }

    /**
     * A convenience method that returns the dataset for the plot, cast as an XYDataset.
     *
     * @return a dataset.
     */
    public XYDataset getTempXYDataset() {
        // Usefull until SignalsDataset is included in jcommon.SubSeriesDataset
        return (XYDataset) getDataset();
    }

    /**
     * Draws the plot on a Java 2D graphics device (such as the screen or a printer).
     *
     * @param g2  the graphics device.
     * @param plotArea  the area within which the plot should be drawn.
     * @param info  an optional info collection object to return data back to the caller.
     */
    public void draw(Graphics2D g2, Rectangle2D plotArea, ChartRenderingInfo info) {

        Insets insets = getInsets();
        if (insets != null) {
            plotArea = new Rectangle2D.Double(plotArea.getX() + insets.left,
                plotArea.getY() + insets.top,
                plotArea.getWidth() - insets.left - insets.right,
                plotArea.getHeight() - insets.top - insets.bottom);
        }

        AxisSpace space = new AxisSpace();
        ValueAxis domainAxis = getDomainAxis();
        ValueAxis rangeAxis = getRangeAxis();
        space = domainAxis.reserveSpace(g2, this, plotArea, getDomainAxisEdge(), space);
        space = rangeAxis.reserveSpace(g2, this, plotArea, getRangeAxisEdge(), space);
        Rectangle2D dataArea = space.shrink(plotArea, null);

        drawBackground(g2, dataArea);

        // draw the axes
        double cursor = 0.0;
        cursor = getDomainAxis().draw(g2, cursor, plotArea, dataArea, getDomainAxisEdge());
        cursor = getRangeAxis().draw(g2, cursor, plotArea, dataArea, getRangeAxisEdge());

        Shape originalClip = g2.getClip();
        g2.clip(dataArea);

        //SignalsDataset data = getDataset();
        XYDataset data = getTempXYDataset();
        if (data != null) {
            int seriesCount = data.getSeriesCount();
            for (int serie = 0; serie < seriesCount; serie++) {
                // area should be remaining area only
                drawMarkedPeriods(data, serie, g2, dataArea);
            }
        }

        drawOutline(g2, dataArea);
        g2.setClip(originalClip);
    }

    /**
     * Draws the marked periods.
     *
     * @param data  the dataset.
     * @param serie  the series.
     * @param g2  the graphics device.
     * @param plotArea  the plot area.
     */
    private void drawMarkedPeriods(XYDataset data, int serie, Graphics2D g2, Rectangle2D plotArea) {

        Paint thisSeriePaint = Color.gray;  // fix later //getFillPaint(0, serie);
        g2.setPaint(thisSeriePaint);
        g2.setStroke(AbstractRenderer.DEFAULT_STROKE);  // fix later getSeriesStroke(serie));

        float opacity = 0.1f;
        if (thisSeriePaint instanceof Color) {
            Color thisSerieColor = (Color) thisSeriePaint;
            int colorSaturation = thisSerieColor.getRed()
                                  + thisSerieColor.getGreen() + thisSerieColor.getBlue();
            if (colorSaturation > 255) {
                opacity = opacity * colorSaturation / 255.0f;
            }
        }
        Composite originalComposite = g2.getComposite();
        g2.setComposite(AlphaComposite.getInstance(AlphaComposite.SRC_OVER, opacity));

        double minY = plotArea.getMinY();
        double maxY = plotArea.getMaxY();

        int itemCount = data.getItemCount(serie);
        for (int itemIndex = 0; itemIndex < itemCount; itemIndex++) {
            if (data.getYValue(serie, itemIndex).doubleValue() == 0) {
                // un -marked period
                continue;
            }
            Number xStart;
            if (itemIndex > 0) {
                xStart = new Long((data.getXValue(serie, itemIndex).longValue()
                                   + data.getXValue(serie, itemIndex - 1).longValue()) / 2);
            }
            else {
                xStart = data.getXValue(serie, itemIndex);
            }
            int j = itemIndex + 1;
            while (j < itemCount) {
                if (data.getYValue(serie, j).doubleValue() == 0) {
                    break;
                }
                j++;
            }
            itemIndex = j;
            Number xEnd;
            if (j < itemCount) {
                xEnd = new Long((data.getXValue(serie, j - 1).longValue()
                                + data.getXValue(serie, j).longValue()) / 2);
            }
            else {
                xEnd = data.getXValue(serie, j - 1);
            }

            double xxStart = getDomainAxis().translateValueToJava2D(xStart.doubleValue(), plotArea,
                                     getDomainAxisEdge());
            double xxEnd = getDomainAxis().translateValueToJava2D(xEnd.doubleValue(), plotArea,
                                    getDomainAxisEdge());

            markPeriod(xxStart, xxEnd, minY, maxY, g2);
        }

        g2.setComposite(originalComposite);

    }

    /**
     * Marks a single period.
     *
     * @param xStart  the start.
     * @param xEnd  the end.
     * @param minY  the minimum y-value.
     * @param maxY  the maximum y-value.
     * @param g2  the graphics device.
     */
    private void markPeriod(double xStart, double xEnd, double minY, double maxY, Graphics2D g2) {
        g2.fill(new Rectangle2D.Double(xStart, minY, xEnd - xStart, maxY - minY));
    }

    /**
     * A zoom method that does nothing.  TO BE DONE.
     *
     * @param percent  the zoom percentage.
     */
    public void zoom(double percent) {
    }

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美一级理论片| 国产日韩欧美高清| 国产精品妹子av| 日韩 欧美一区二区三区| 成人精品在线视频观看| 欧美丰满嫩嫩电影| 亚洲视频在线观看一区| 九九九精品视频| 色综合久久久久| 国产精品久久久久9999吃药| 日韩1区2区3区| 欧美亚洲日本一区| 亚洲毛片av在线| 成人黄动漫网站免费app| 日韩欧美国产三级电影视频| 亚洲gay无套男同| 在线这里只有精品| 国产精品国产三级国产aⅴ无密码| 韩国视频一区二区| 欧美videossexotv100| 亚洲成av人片在线观看无码| 日本久久一区二区三区| 国产精品区一区二区三区| 国产精品一区在线观看你懂的| 日韩一区二区视频| 日韩电影免费一区| 欧美午夜精品免费| 亚洲一卡二卡三卡四卡无卡久久| 91蝌蚪porny九色| 亚洲色图在线播放| 色诱亚洲精品久久久久久| 国产精品卡一卡二卡三| 国产成人高清在线| 日本一区二区电影| 成人夜色视频网站在线观看| 国产视频一区二区在线| 国产在线麻豆精品观看| 久久久综合精品| 国产suv精品一区二区883| 奇米影视一区二区三区| 国产盗摄精品一区二区三区在线| 国产成人av自拍| 精品国产污网站| 精东粉嫩av免费一区二区三区 | 久久综合狠狠综合久久综合88| 日本成人中文字幕在线视频 | 97精品国产露脸对白| 一区二区三区日韩在线观看| 99精品在线观看视频| 亚洲精品乱码久久久久久| 91黄色小视频| 蜜臀久久久久久久| 久久精品一区二区三区不卡牛牛| 国产不卡在线播放| 中文字幕一区日韩精品欧美| 色狠狠综合天天综合综合| 三级一区在线视频先锋| 日韩一区二区三区免费看| 国产一区二区毛片| 亚洲免费成人av| 5月丁香婷婷综合| 国产一区二区三区四区在线观看| 国产精品久久久久久久蜜臀| 色综合一区二区| 国产成a人无v码亚洲福利| 中文文精品字幕一区二区| 色狠狠一区二区| 麻豆久久一区二区| 中文字幕中文字幕一区| 欧美日本一区二区在线观看| 国产一区视频网站| 一区二区三区丝袜| 久久亚洲精精品中文字幕早川悠里| 91在线观看污| 蜜桃免费网站一区二区三区| 国产精品伦一区二区三级视频| 欧美日韩你懂的| 福利电影一区二区三区| 性做久久久久久久久| 亚洲国产高清在线| 欧美xxxx在线观看| 欧美综合一区二区三区| 国产91富婆露脸刺激对白| 午夜精品福利在线| 亚洲精品国产a久久久久久| 精品不卡在线视频| 欧美视频一二三区| 99久久99久久精品免费观看| 青青草原综合久久大伊人精品优势| 亚洲婷婷综合色高清在线| 日韩精品专区在线影院重磅| 欧洲av一区二区嗯嗯嗯啊| 成人午夜看片网址| 韩日欧美一区二区三区| 日本强好片久久久久久aaa| 一区二区三区中文字幕在线观看| 精品人在线二区三区| 欧美日韩免费高清一区色橹橹| 国产精品白丝jk白祙喷水网站| 免费精品99久久国产综合精品| 亚洲自拍都市欧美小说| 国产精品久久久久久妇女6080| 精品99999| 日韩欧美色综合| 欧美一区二区三区四区高清 | 成人精品一区二区三区四区| 久久国产剧场电影| 青青草精品视频| 狠狠色狠狠色综合| 亚洲国产日韩综合久久精品| 一区视频在线播放| 国产精品国模大尺度视频| 国产日韩欧美精品电影三级在线| 日韩欧美黄色影院| 欧美精品一区二区在线观看| 日韩免费观看高清完整版在线观看| 欧美日韩视频在线第一区| 欧美男人的天堂一二区| 欧美日韩一区二区三区高清| 欧美日韩亚洲综合在线| 欧美丰满少妇xxxxx高潮对白 | 成人a级免费电影| 成人av网站免费| 色综合中文字幕| 欧美性做爰猛烈叫床潮| 欧美在线免费播放| 欧美精品久久99久久在免费线| 欧美在线免费视屏| 91精品欧美综合在线观看最新| 91精品国产综合久久福利| 日韩欧美专区在线| wwww国产精品欧美| 亚洲国产精品成人综合| 国产精品久久一卡二卡| 自拍偷拍欧美激情| 亚洲一区二区三区三| 蜜臀av性久久久久蜜臀av麻豆| 国产呦精品一区二区三区网站| 国产·精品毛片| 国产不卡视频一区| 欧美在线观看视频在线| 日韩一区二区精品| 国产精品人妖ts系列视频| 亚洲影视资源网| 免费在线观看一区| av动漫一区二区| 欧美日韩免费在线视频| 日韩精品一区二区三区中文不卡 | 美国毛片一区二区| 国产一区91精品张津瑜| 99久久精品国产一区| 欧美日韩三级一区二区| 欧美成人午夜电影| 亚洲色图欧洲色图婷婷| 日本欧美一区二区三区乱码| 成人app软件下载大全免费| 欧美日韩在线一区二区| 久久久久国产精品麻豆ai换脸| 樱花草国产18久久久久| 久久超级碰视频| 91丨九色丨黑人外教| 精品少妇一区二区三区| 亚洲精品免费一二三区| 国内一区二区在线| 欧美日韩免费观看一区二区三区| 久久久91精品国产一区二区三区| 亚洲综合清纯丝袜自拍| 国产美女娇喘av呻吟久久| 欧美三级三级三级爽爽爽| 欧美国产日韩在线观看| 美女视频第一区二区三区免费观看网站| 99久久婷婷国产| 久久影院午夜论| 天天av天天翘天天综合网色鬼国产| 成人在线视频首页| 日韩欧美二区三区| 五月天激情综合网| 91香蕉国产在线观看软件| 久久夜色精品一区| 青青草91视频| 欧美日本一区二区三区四区| 日韩电影在线看| 色哟哟一区二区三区| 国产午夜亚洲精品羞羞网站| 免费av网站大全久久| 欧美美女网站色| 一区二区三区在线播放| 成人永久免费视频| 精品久久国产97色综合| 秋霞影院一区二区| 欧美一区二区三区在| 石原莉奈一区二区三区在线观看| 欧美午夜片在线看| 亚洲国产中文字幕| 欧美亚洲一区二区三区四区| 一区二区不卡在线播放 | 欧美日韩1234| 亚洲国产成人av| 欧美色视频在线观看| 夜色激情一区二区|