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

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

?? abstractpieitemlabelgenerator.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? JAVA
字號(hào):
/* ===========================================================
 * 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.]
 *
 * ----------------------------------
 * AbstractPieItemLabelGenerator.java
 * ----------------------------------
 * (C) Copyright 2004, 2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: AbstractPieItemLabelGenerator.java,v 1.5.2.1 2005/10/25 20:49:02 mungady Exp $
 *
 * Changes
 * -------
 * 09-Nov-2004 : Version 1, draws out code from StandardPieItemLabelGenerator 
 *               and StandardPieToolTipGenerator (DG);
 *
 */

package org.jfree.chart.labels;

import java.io.Serializable;
import java.text.MessageFormat;
import java.text.NumberFormat;

import org.jfree.data.general.DatasetUtilities;
import org.jfree.data.general.PieDataset;

/**
 * A base class used for generating pie chart item labels.
 */
public class AbstractPieItemLabelGenerator implements Serializable {
    
    /** For serialization. */
    private static final long serialVersionUID = 7347703325267846275L;
    
    /** The label format string. */
    private String labelFormat;
    
    /** A number formatter for the value. */
    private NumberFormat numberFormat;
    
    /** A number formatter for the percentage. */
    private NumberFormat percentFormat;
    
    /**
     * Creates an item label generator using the specified number formatters.
     *
     * @param labelFormat  the label format string (<code>null</code> not
     *                     permitted).
     * @param numberFormat  the format object for the values (<code>null</code>
     *                      not permitted).
     * @param percentFormat  the format object for the percentages
     *                       (<code>null</code> not permitted).
     */
    protected AbstractPieItemLabelGenerator(String labelFormat,
                                            NumberFormat numberFormat, 
                                            NumberFormat percentFormat) {

        if (labelFormat == null) {
            throw new IllegalArgumentException("Null 'labelFormat' argument.");
        }
        if (numberFormat == null) {
            throw new IllegalArgumentException("Null 'numberFormat' argument.");
        }
        if (percentFormat == null) {
            throw new IllegalArgumentException(
                "Null 'percentFormat' argument."
            );   
        }
        this.labelFormat = labelFormat;
        this.numberFormat = numberFormat;
        this.percentFormat = percentFormat;

    }

    /**
     * Returns the label format string.
     * 
     * @return The label format string (never <code>null</code>).
     */
    public String getLabelFormat() {
        return this.labelFormat;
    }
    
    /**
     * Returns the number formatter.
     *
     * @return The formatter (never <code>null</code>).
     */
    public NumberFormat getNumberFormat() {
        return this.numberFormat;
    }

    /**
     * Returns the percent formatter.
     *
     * @return The formatter (never <code>null</code>).
     */
    public NumberFormat getPercentFormat() {
        return this.percentFormat;
    }

    /**
     * Creates the array of items that can be passed to the 
     * {@link MessageFormat} class for creating labels.  The returned array
     * contains four values:
     * <ul>
     * <li>result[0] = the section key converted to a <code>String</code>;</li>
     * <li>result[1] = the formatted data value;</li>
     * <li>result[2] = the formatted percentage (of the total);</li>
     * <li>result[3] = the formatted total value.</li>
     * </ul>
     *
     * @param dataset  the dataset (<code>null</code> not permitted).
     * @param key  the key (<code>null</code> not permitted).
     *
     * @return The items (never <code>null</code>).
     */
    protected Object[] createItemArray(PieDataset dataset, Comparable key) {
        Object[] result = new Object[4];
        double total = DatasetUtilities.calculatePieDatasetTotal(dataset);
        result[0] = key.toString();
        Number value = dataset.getValue(key);
        if (value != null) {
            result[1] = this.numberFormat.format(value);  
        }
        else {
            result[1] = "null";
        }
        double percent = 0.0;
        if (value != null) {
            double v = value.doubleValue();
            if (v > 0.0) {
                percent = v / total; 
            }
        }       
        result[2] = this.percentFormat.format(percent);
        result[3] = this.numberFormat.format(total);
        return result;
    }
    
    /**
     * Generates a label for a pie section.
     * 
     * @param dataset  the dataset (<code>null</code> not permitted).
     * @param key  the section key (<code>null</code> not permitted).
     * 
     * @return The label (possibly <code>null</code>).
     */
    protected String generateSectionLabel(PieDataset dataset, Comparable key) {
        String result = null;    
        if (dataset != null) {
            Object[] items = createItemArray(dataset, key);
            result = MessageFormat.format(this.labelFormat, items);
        }
        return result;
    }

    /**
     * Tests the generator for equality with an arbitrary object.
     *
     * @param obj  the object to test against (<code>null</code> permitted).
     *
     * @return A boolean.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof AbstractPieItemLabelGenerator)) {
            return false;
        }
        
        AbstractPieItemLabelGenerator that 
            = (AbstractPieItemLabelGenerator) obj;
        if (!this.labelFormat.equals(that.labelFormat)) {
            return false;
        }
        if (!this.numberFormat.equals(that.numberFormat)) {
            return false;   
        }
        if (!this.percentFormat.equals(that.percentFormat)) {
            return false;   
        }
        return true;

    }
    
    /**
     * Returns an independent copy of the generator.
     * 
     * @return A clone.
     * 
     * @throws CloneNotSupportedException  should not happen.
     */
    public Object clone() throws CloneNotSupportedException {      
        AbstractPieItemLabelGenerator clone 
            = (AbstractPieItemLabelGenerator) super.clone();
        if (this.numberFormat != null) {
            clone.numberFormat = (NumberFormat) this.numberFormat.clone();
        } 
        return clone;
    }

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人福利片| 欧美一区二区在线看| 国产精品系列在线播放| 免费看日韩精品| 免费观看在线综合色| 日韩高清不卡一区| 奇米影视在线99精品| 日本v片在线高清不卡在线观看| 亚洲福中文字幕伊人影院| 亚洲国产精品欧美一二99| 亚洲国产综合91精品麻豆| 亚洲第四色夜色| 亚洲网友自拍偷拍| 日韩精品亚洲一区二区三区免费| 秋霞av亚洲一区二区三| 美日韩一区二区三区| 久久精品国产第一区二区三区| 免费三级欧美电影| 国产精品综合二区| 成人av网站免费观看| 91在线精品一区二区三区| 色呦呦日韩精品| 欧美三级电影在线观看| 91精品视频网| 精品99999| 国产精品久久影院| 日韩理论片中文av| 午夜精品久久久久久久99水蜜桃 | 午夜影院久久久| 男女男精品视频| 国产成人精品午夜视频免费| 成人国产精品免费观看| 欧美午夜免费电影| 日韩精品一区二区三区四区视频 | 亚洲另类在线制服丝袜| 三级一区在线视频先锋| 国产一区视频网站| 99久久精品情趣| 欧美性大战xxxxx久久久| 精品三级在线看| 国产精品久久久久久亚洲伦| 亚洲高清在线精品| 久久99国产精品久久99| 91在线看国产| 欧美成人a∨高清免费观看| 中文字幕av免费专区久久| 夜夜嗨av一区二区三区网页| 久久精品国产秦先生| av激情成人网| 日韩一区二区三区免费观看| 国产精品动漫网站| 丝瓜av网站精品一区二区| 国产精品综合久久| 欧美精品在线观看播放| 国产精品私人影院| 日本特黄久久久高潮| av一区二区久久| 日韩欧美亚洲国产另类 | 国产在线不卡一卡二卡三卡四卡| 91偷拍与自偷拍精品| 欧美一级片在线| 亚洲精品网站在线观看| 韩日av一区二区| 精品国产免费一区二区三区四区 | 日本一区二区三区在线观看| 亚洲一区免费观看| 国产精品一区二区男女羞羞无遮挡| 色就色 综合激情| 国产欧美一区二区精品婷婷| 日韩—二三区免费观看av| 91麻豆精品一区二区三区| 久久综合一区二区| 丝袜诱惑制服诱惑色一区在线观看| 99在线热播精品免费| 欧美电影免费观看高清完整版在| 亚洲欧美一区二区三区久本道91 | 日韩欧美国产综合一区 | 亚洲午夜久久久| av资源站一区| 久久久噜噜噜久久人人看| 免费在线观看一区二区三区| 欧美制服丝袜第一页| 成人欧美一区二区三区白人| 国产一区二区看久久| 日韩视频免费直播| 亚洲大片免费看| 日本韩国欧美在线| 综合久久给合久久狠狠狠97色 | 成人禁用看黄a在线| 精品国产乱子伦一区| 日韩av电影天堂| 欧美日韩亚洲高清一区二区| 一区二区三区中文字幕精品精品| 成人午夜在线视频| 国产日韩欧美电影| 国产91精品欧美| 国产精品三级电影| 丰满白嫩尤物一区二区| 久久精品视频一区| 国产九色精品成人porny| 久久久久国产精品麻豆ai换脸| 久久国产精品一区二区| 日韩欧美高清在线| 激情欧美一区二区| 久久免费美女视频| 国产不卡视频一区| 国产精品传媒入口麻豆| 丁香啪啪综合成人亚洲小说| 欧美羞羞免费网站| 中文字幕日韩av资源站| 99久久婷婷国产综合精品| 日本一区二区免费在线| 国产精品亚洲专一区二区三区 | 99久久综合99久久综合网站| 国产亚洲精品aa| 久久99久久99| 欧美激情中文字幕| 国产成人综合亚洲网站| 久久久欧美精品sm网站| 狠狠色综合播放一区二区| 日韩午夜在线播放| 国产乱码精品一区二区三区av| 精品日韩欧美一区二区| 国内精品久久久久影院薰衣草| 日韩久久免费av| 老司机免费视频一区二区三区| 欧美精品一区二区不卡| 久久精品国产久精国产爱| 精品国产一区二区亚洲人成毛片| 青青草国产精品亚洲专区无| 91麻豆精品久久久久蜜臀| 日韩精品一区第一页| 精品婷婷伊人一区三区三| 视频一区中文字幕国产| 在线观看日韩电影| 亚洲bt欧美bt精品777| 日韩女优毛片在线| 黑人巨大精品欧美黑白配亚洲| 国产视频一区二区在线| 成人免费看片app下载| 亚洲视频中文字幕| 欧美一级高清片| 国产在线一区观看| 中文字幕不卡在线播放| 99久久777色| 综合激情网...| 欧美视频一区二区三区四区 | 午夜精品久久久久久久99水蜜桃| 欧美一区二区三区免费在线看 | 性感美女久久精品| 精品剧情在线观看| 波多野结衣的一区二区三区| 亚洲精品菠萝久久久久久久| 日韩免费性生活视频播放| 国产精品白丝av| 亚洲综合精品自拍| 日韩一区二区三区在线观看| 国产福利精品一区二区| 一区二区三区免费| 日韩亚洲欧美一区| 国产成人鲁色资源国产91色综| 亚洲色图欧美在线| 91精品婷婷国产综合久久竹菊| 97精品超碰一区二区三区| 亚欧色一区w666天堂| 久久久国产一区二区三区四区小说 | 日韩成人精品在线观看| 国产午夜久久久久| 欧美日韩一区在线观看| 国产一区二区三区香蕉| 国产精品看片你懂得| 日韩欧美在线影院| 91一区二区三区在线观看| 人妖欧美一区二区| 亚洲欧美国产77777| 26uuu欧美| 欧美视频第二页| 国产精品一二三| 石原莉奈一区二区三区在线观看| 日韩美女视频在线| 欧美精品久久一区二区三区| 国产aⅴ综合色| 亚洲 欧美综合在线网络| 国产精品久久久久久久久免费桃花| 欧美一区二区三区在线观看 | 一级特黄大欧美久久久| 日韩欧美一区二区视频| 在线播放日韩导航| 99精品国产热久久91蜜凸| 青青草91视频| 亚洲一区二区三区影院| 中文字幕在线一区| 欧美成人bangbros| 欧美午夜视频网站| 成人精品一区二区三区中文字幕 | 国产成人午夜99999| 久久99精品久久久久久动态图 | 免费欧美高清视频| 亚洲国产成人porn| 欧美国产日韩一二三区|