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

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

?? sampleysymbolicdataset.java

?? Web圖形化的Java庫(kù)
?? JAVA
字號(hào):
/* ======================================
 * 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.
 *
 * ---------------------------
 * SampleYSymbolicDataset.java
 * ---------------------------
 *
 * Original Author:  Anthony Boulestreau.
 * Contributor(s):   -;
 *
 *
 * Changes
 * -------
 * 29-Mar-2002 : Version 1 (AB);
 * 11-Oct-2002 : Fixed errors reported by Checkstyle (DG);
 *
 */

package org.jfree.chart.demo;

import java.lang.reflect.Array;
import java.util.List;
import java.util.Vector;

import org.jfree.data.AbstractSeriesDataset;
import org.jfree.data.XYDataset;
import org.jfree.data.YisSymbolic;

/**
 * A dataset implementation that provides random data for a symbolic plot demo.  This sample
 * dataset has numerical x-values, and symbolic y-values.
 *
 * @author Anthony Boulestreau
 */
public class SampleYSymbolicDataset extends AbstractSeriesDataset
                                    implements XYDataset, YisSymbolic {

    /** The series count. */
    private static final int DEFAULT_SERIES_COUNT = 1;

    /** The item count. */
    private static final int DEFAULT_ITEM_COUNT = 50;

    /** The series index. */
    private int serie;

    /** The item index. */
    private int item;

    /** The series names. */
    private String[] serieNames;

    /** The x values. */
    private Double[][] xValues;

    /** The y values. */
    private Integer[][] yValues;

    /** The y symbolic values. */
    private String[] ySymbolicValues;

    /** The dataset name. */
    private String datasetName;

    /**
     * Creates a new sample dataset.
     *
     * @param datasetName  the dataset name.
     * @param xRange  the upper limit of the (random) x-values.
     * @param tabString  the symbols for the y-values.
     */
    public SampleYSymbolicDataset(String datasetName, int xRange, String[] tabString) {
        this(datasetName, xRange, tabString, DEFAULT_SERIES_COUNT, DEFAULT_ITEM_COUNT, null);
    }

    /**
     * Creates a new sample dataset.
     *
     * @param datasetName  the dataset name.
     * @param xRange  the upper limit of the (random) x-values.
     * @param tabString  the symbolic y-values.
     * @param seriesCount  the number of series to create.
     * @param itemCount  the number of items to create for each series.
     * @param serieNames  the series names.
     */
    public SampleYSymbolicDataset(String datasetName, 
                                  int xRange,
                                  String[] tabString, 
                                  int seriesCount, 
                                  int itemCount, 
                                  String[] serieNames) {

        this.datasetName = datasetName;
        this.ySymbolicValues = tabString;
        this.serie = seriesCount;
        this.item = itemCount;
        this.serieNames = serieNames;
        this.xValues = new Double[seriesCount][itemCount];
        this.yValues = new Integer[seriesCount][itemCount];

        for (int s = 0; s < seriesCount; s++) {
            for (int i = 0; i < itemCount; i++) {
                double x = Math.random() * xRange;
                double y = Math.random() * tabString.length;
                xValues[s][i] = new Double(x);
                yValues[s][i] = new Integer((int) y);
            }
        }
    }

    /**
     * Creates a new sample dataset.
     *
     * @param datasetName  the dataset name.
     * @param xValues  the x values.
     * @param yValues  the y values.
     * @param ySymbolicValues  the y symbols
     * @param seriesCount  the series count.
     * @param itemCount  the item count.
     * @param serieNames  the series names.
     */
    public SampleYSymbolicDataset(String datasetName, 
                                  Double[][] xValues,
                                  Integer[][] yValues, 
                                  String[] ySymbolicValues,
                                  int seriesCount, 
                                  int itemCount, 
                                  String[] serieNames) {

        this.datasetName = datasetName;
        this.xValues = xValues;
        this.yValues = yValues;
        this.ySymbolicValues = ySymbolicValues;
        this.serie = seriesCount;
        this.item = itemCount;
        this.serieNames = serieNames;

    }


    /**
     * Returns the x-value for the specified series and item.  Series are
     * numbered 0, 1, ...
     *
     * @param series  the index (zero-based) of the series.
     * @param item  the index (zero-based) of the required item.
     *
     * @return the x-value for the specified series and item.
     */
    public Number getXValue(int series, int item) {
        return xValues[series][item];
    }

    /**
     * Returns the y-value for the specified series and item.  Series are
     * numbered 0, 1, ...
     *
     * @param series  the index (zero-based) of the series.
     * @param item  the index (zero-based) of the required item.
     *
     * @return the y-value for the specified series and item.
     */
    public Number getYValue(int series, int item) {
        return yValues[series][item];
    }

    /**
     * Sets the y-value for the specified series and item with the specified
     * new <CODE>Number</CODE> value.  Series are numbered 0, 1, ...
     * <P>
     * This method is used by combineYSymbolicDataset to modify the reference
     * to the symbolic value ...
     *
     * @param series  the index (zero-based) of the series.
     * @param item  the index (zero-based) of the required item.
     * @param newValue the value to set.
     */
    public void setYValue(int series, int item, Number newValue) {
        yValues[series][item] = (Integer) newValue;
    }

    /**
     * Returns the number of series in the dataset.
     *
     * @return The number of series in the dataset.
     */
    public int getSeriesCount() {
        return this.serie;
    }

    /**
     * Returns the name of the series.
     *
     * @param series  the index (zero-based) of the series.
     *
     * @return the name of the series.
     */
    public String getSeriesName(int series) {
        if (serieNames != null) {
            return serieNames[series];
        }
        else {
            return datasetName + series;
        }
    }

    /**
     * Returns the number of items in the specified series.
     *
     * @param series The index (zero-based) of the series.
     *
     * @return the number of items in the specified series.
     */
    public int getItemCount(int series) {
        return this.item;
    }

    /**
     * Returns the list of symbolic values.
     *
     * @return array of symbolic value.
     */
    public String[] getYSymbolicValues() {
        return ySymbolicValues;
    }

    /**
     * Sets the list of symbolic values.
     *
     * @param sValues the new list of symbolic value.
     */
    public void setYSymbolicValues(String[] sValues) {
        ySymbolicValues = sValues;
    }

    /**
     * Returns the symbolic value of the data set specified by
     * <CODE>series</CODE> and <CODE>item</CODE> parameters.
     *
     * @param series value of the serie.
     * @param item value of the item.
     *
     * @return the symbolic value.
     */
    public String getYSymbolicValue(int series, int item) {
        Integer intValue = (Integer) getYValue(series, item);
        return getYSymbolicValue(intValue);
    }

    /**
     * Returns the symbolic value linked with the specified <CODE>Integer</CODE>.
     *
     * @param val value of the integer linked with the symbolic value.
     *
     * @return the symbolic value.
     */
    public String getYSymbolicValue(Integer val) {
        return ySymbolicValues[val.intValue()];
    }

    /**
     * This function modify <CODE>dataset1</CODE> and <CODE>dataset1</CODE> in
     * order that they share the same symbolic value list.
     * <P>
     * The sharing symbolic value list is obtained adding the symbolic data
     * list of the fist data set to the symbolic data list of the second data
     * set.
     * <P>
     * This function is use with the <I>combined plot</I> functions of
     * JFreeChart.
     *
     * @param  dataset1 the first data set to combine.
     * @param  dataset2 the second data set to combine.
     *
     * @return  the shared symbolic array.
     */
    public static String[] combineYSymbolicDataset(YisSymbolic dataset1, YisSymbolic dataset2) {

        SampleYSymbolicDataset sDataset1 = (SampleYSymbolicDataset) dataset1;
        SampleYSymbolicDataset sDataset2 = (SampleYSymbolicDataset) dataset2;
        String[] sDatasetSymbolicValues1 = sDataset1.getYSymbolicValues();
        String[] sDatasetSymbolicValues2 = sDataset2.getYSymbolicValues();

        //Combine the two list of symbolic value of the two data set
        int s1length = sDatasetSymbolicValues1.length;
        int s2length = sDatasetSymbolicValues2.length;
        List ySymbolicValuesCombined = new Vector();
        for (int i = 0; i < s1length; i++) {
            ySymbolicValuesCombined.add(sDatasetSymbolicValues1[i]);
        }
        for (int i = 0; i < s2length; i++) {
            if (!ySymbolicValuesCombined.contains(sDatasetSymbolicValues2[i])) {
                ySymbolicValuesCombined.add(sDatasetSymbolicValues2[i]);
            }
        }

        //Change the Integer reference of the second data set
        int newIndex;
        for (int i = 0; i < sDataset2.getSeriesCount(); i++) {
            for (int j = 0; j < sDataset2.getItemCount(i); j++) {
                newIndex =  ySymbolicValuesCombined.indexOf(sDataset2.getYSymbolicValue(i, j));
                sDataset2.setYValue(i, j, new Integer(newIndex));
            }
        }

        //Set the new list of symbolic value on the two data sets
        String[] ySymbolicValuesCombinedA = new String[ySymbolicValuesCombined.size()];
        ySymbolicValuesCombined.toArray(ySymbolicValuesCombinedA);
        sDataset1.setYSymbolicValues(ySymbolicValuesCombinedA);
        sDataset2.setYSymbolicValues(ySymbolicValuesCombinedA);

        return ySymbolicValuesCombinedA;
    }

    /**
     * Clone the SampleYSymbolicDataset object
     *
     * @return the cloned object.
     */
    public Object clone() {
        String nDatasetName = new String(this.datasetName);
        Double[][] nXValues = (Double[][]) cloneArray(this.xValues);
        Integer[][] nYValues = (Integer[][]) cloneArray(this.yValues);
        String[] nYSymbolicValues = (String[]) cloneArray(this.ySymbolicValues);
        int serie = this.serie;
        int item = this.item;
        String[] serieNames = (String[]) cloneArray(this.serieNames);
        return new SampleYSymbolicDataset(nDatasetName, nXValues, nYValues,
                nYSymbolicValues, serie, item, serieNames);
    }

    /**
     * Clones the array.
     *
     * @param arr  the array.
     *
     * @return an array.
     */
    private static Object cloneArray(Object arr) {

        if (arr == null) {
            return arr;
        }

        Class cls = arr.getClass();
        if (!cls.isArray()) {
            return arr;
        }

        int length = Array.getLength(arr);
        Object[] newarr = (Object[]) Array.newInstance(cls.getComponentType(), length);

        Object obj;

        for (int i = 0; i < length; i++) {
            obj = Array.get(arr, i);
            if (obj.getClass().isArray()) {
                newarr[i] = cloneArray(obj);
            }
            else {
                newarr[i] = obj;
            }
        }

        return newarr;
     }

}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产传媒日韩欧美成人| 国产一区在线精品| 欧美日韩中文字幕精品| 亚洲福利视频导航| 欧美巨大另类极品videosbest| 日本大胆欧美人术艺术动态| 日韩女优制服丝袜电影| 国产精品91一区二区| 国产精品久久免费看| 色94色欧美sute亚洲线路一ni| 亚洲一区二区三区四区的| 日韩一区二区三区高清免费看看| 极品少妇xxxx偷拍精品少妇| 国产精品久久久久久久久晋中 | 日韩理论在线观看| 色av成人天堂桃色av| 免费人成在线不卡| 亚洲国产高清在线观看视频| 色八戒一区二区三区| 久久精品国产精品青草| 国产精品久久久久久久久免费相片| 欧洲色大大久久| 国产一区二区调教| 国产欧美一区二区精品性色 | 午夜精品一区在线观看| 制服丝袜亚洲色图| 国产成人午夜精品影院观看视频 | 日韩欧美在线影院| 成人v精品蜜桃久久一区| 久久老女人爱爱| 欧美亚洲自拍偷拍| 欧美日韩在线播放| 欧美午夜精品久久久久久孕妇| 色婷婷精品大在线视频| 色婷婷精品大在线视频| 色综合久久久久综合99| 色伊人久久综合中文字幕| 色又黄又爽网站www久久| 91色九色蝌蚪| 一本高清dvd不卡在线观看| 91网页版在线| 色综合久久88色综合天天免费| 99re成人在线| 欧美性受xxxx黑人xyx性爽| 欧美三级电影在线观看| 精品精品欲导航| 国产99久久久国产精品潘金| 国产米奇在线777精品观看| 国产精品中文有码| 不卡的av电影在线观看| 99精品欧美一区二区三区小说 | 日本视频中文字幕一区二区三区| 亚洲国产aⅴ天堂久久| 亚洲成人综合网站| 奇米色777欧美一区二区| 激情五月激情综合网| 国产精品一区二区三区四区| 成人精品电影在线观看| 色狠狠桃花综合| 911精品国产一区二区在线| 精品久久五月天| 日韩一区有码在线| 亚洲va韩国va欧美va精品| 久久99久久99小草精品免视看| 国产精品18久久久| 欧洲一区在线电影| 日韩午夜在线观看视频| 国产日产欧美一区二区视频| 亚洲伦理在线免费看| 免费高清不卡av| 成人黄页毛片网站| 欧美日韩国产123区| 久久精品人人做| 亚洲一区二区三区视频在线 | 久久综合色鬼综合色| 亚洲图片另类小说| 日韩激情视频网站| 粉嫩av一区二区三区| 欧美二区三区91| 国产精品第一页第二页第三页| 午夜精品免费在线观看| 国产精品一区二区在线看| 欧美丝袜丝nylons| 欧美激情一区二区三区不卡 | 成人欧美一区二区三区视频网页| 五月天一区二区三区| 成人污污视频在线观看| 欧美高清一级片在线| 国产精品国产自产拍在线| 日本欧洲一区二区| 91国偷自产一区二区使用方法| 久久精子c满五个校花| 亚洲成av人片在线| a4yy欧美一区二区三区| 欧美成人a在线| 亚洲自拍偷拍图区| 丁香婷婷综合激情五月色| 日韩三级中文字幕| 亚洲成人一区在线| 99国产精品久| 久久久久久9999| 麻豆精品在线视频| 欧美绝品在线观看成人午夜影视| 亚洲视频网在线直播| 国产激情偷乱视频一区二区三区| 91精品国产高清一区二区三区| 亚洲综合在线电影| 99久久婷婷国产精品综合| 久久一二三国产| 久久国内精品视频| 日韩一区二区在线观看视频| 亚洲综合视频在线观看| av欧美精品.com| 国产农村妇女精品| 精品一区二区三区蜜桃| 日韩色在线观看| 免费观看久久久4p| 欧美美女网站色| 午夜视频在线观看一区二区 | 欧美性淫爽ww久久久久无| 亚洲婷婷国产精品电影人久久| 国产成人精品在线看| 久久久久久久久伊人| 久久99国产乱子伦精品免费| 欧美一区二区三区日韩| 图片区小说区国产精品视频| 欧美在线看片a免费观看| 亚洲女同ⅹxx女同tv| 一本一道久久a久久精品综合蜜臀| 国产精品美女久久久久aⅴ国产馆 国产精品美女久久久久av爽李琼 国产精品美女久久久久高潮 | 亚洲丝袜美腿综合| 北条麻妃一区二区三区| 国产精品美女久久久久久| 成人av网站在线| 国产精品成人在线观看| 99久久精品免费看| 亚洲激情自拍视频| 欧美主播一区二区三区| 午夜电影网一区| 日韩欧美美女一区二区三区| 久久9热精品视频| 久久综合色综合88| zzijzzij亚洲日本少妇熟睡| 亚洲欧洲精品一区二区精品久久久 | 日本一区二区三区久久久久久久久不| 国产在线观看一区二区| 国产女同互慰高潮91漫画| 成人黄色网址在线观看| 综合婷婷亚洲小说| 欧美网站一区二区| 裸体在线国模精品偷拍| 中文字幕巨乱亚洲| 91福利在线导航| 三级在线观看一区二区| 欧美大片一区二区三区| 国产激情视频一区二区三区欧美| 中文字幕一区二区视频| 欧美系列亚洲系列| 九九国产精品视频| 国产精品精品国产色婷婷| 欧美午夜精品久久久| 久久精品国产秦先生| 国产精品电影一区二区| 欧美日韩综合在线| 韩国av一区二区三区四区| 成人欧美一区二区三区在线播放| 欧美日韩综合在线| 国产成a人无v码亚洲福利| 亚洲综合色视频| 久久久久久久久久久久久夜| 欧美专区日韩专区| 国产精品夜夜嗨| 亚洲18影院在线观看| 国产婷婷色一区二区三区在线| 欧美性感一类影片在线播放| 国产一区二区在线看| 亚洲午夜三级在线| 国产午夜精品在线观看| 欧美午夜精品理论片a级按摩| 国产一区二区免费在线| 亚洲一二三区在线观看| 久久综合久久综合九色| 欧美色爱综合网| 成人美女在线视频| 久久精品72免费观看| 亚洲女人的天堂| 久久老女人爱爱| 91麻豆精品国产91久久久使用方法| 成人国产精品免费观看| 蜜桃视频在线观看一区二区| 一区二区国产盗摄色噜噜| 久久久久久久久岛国免费| 69成人精品免费视频| 99久久综合狠狠综合久久| 精品一区二区在线观看| 亚洲444eee在线观看| 亚洲精品国产第一综合99久久 | 亚洲电影欧美电影有声小说| 中文字幕av一区二区三区高| 欧美高清dvd|