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

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

?? abstractcategoryitemlabelgenerator.java

?? 制作圖表的好工具
?? JAVA
字號:
/* ===========================================================
 * 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.]
 * 
 * ---------------------------------------
 * AbstractCategoryItemLabelGenerator.java
 * ---------------------------------------
 * (C) Copyright 2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: AbstractCategoryItemLabelGenerator.java,v 1.6.2.1 2005/10/25 20:49:02 mungady Exp $
 *
 * Changes
 * -------
 * 11-May-2004 : Version 1, distilled from StandardCategoryLabelGenerator (DG);
 * 31-Jan-2005 : Added methods to return row and column labels (DG);
 * 17-May-2005 : Added percentage to item array (DG);
 *
 */

package org.jfree.chart.labels;

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

import org.jfree.data.DataUtilities;
import org.jfree.data.category.CategoryDataset;
import org.jfree.util.ObjectUtilities;
import org.jfree.util.PublicCloneable;

/**
 * A base class that can be used to create a label or tooltip generator that 
 * can be assigned to a 
 * {@link org.jfree.chart.renderer.category.CategoryItemRenderer}.
 */
public abstract class AbstractCategoryItemLabelGenerator 
                implements PublicCloneable, Cloneable, Serializable {

    /** For serialization. */
    private static final long serialVersionUID = -7108591260223293197L;
    
    /** 
     * The label format string used by a <code>MessageFormat</code> object to 
     * combine the standard items:  {0} = series name, {1} = category, 
     * {2} = value, {3} = value as a percentage of the column total.
     */
    private String labelFormat;
    
    /** The string used to represent a null value. */
    private String nullValueString;
    
    /** 
     * A number formatter used to preformat the value before it is passed to 
     * the MessageFormat object. 
     */
    private NumberFormat numberFormat;

    /**
     * A date formatter used to preformat the value before it is passed to the
     * MessageFormat object.
     */ 
    private DateFormat dateFormat;
    
    /**
     * A number formatter used to preformat the percentage value before it is 
     * passed to the MessageFormat object.
     */ 
    private NumberFormat percentFormat;
    
    /**
     * Creates a label generator with the specified number formatter.
     *
     * @param labelFormat  the label format string (<code>null</code> not 
     *                     permitted).
     * @param formatter  the number formatter (<code>null</code> not permitted).
     */
    protected AbstractCategoryItemLabelGenerator(String labelFormat, 
                                                 NumberFormat formatter) {
        if (labelFormat == null) {
            throw new IllegalArgumentException("Null 'labelFormat' argument.");
        }
        if (formatter == null) {
            throw new IllegalArgumentException("Null 'formatter' argument.");
        }
        this.labelFormat = labelFormat;
        this.numberFormat = formatter;
        this.percentFormat = NumberFormat.getPercentInstance();
        this.dateFormat = null;
        this.nullValueString = "-";
    }

    /**
     * Creates a label generator with the specified date formatter.
     *
     * @param labelFormat  the label format string (<code>null</code> not 
     *                     permitted).
     * @param formatter  the date formatter (<code>null</code> not permitted).
     */
    protected AbstractCategoryItemLabelGenerator(String labelFormat, 
                                                 DateFormat formatter) {
        if (labelFormat == null) {
            throw new IllegalArgumentException("Null 'labelFormat' argument.");
        }
        if (formatter == null) {
            throw new IllegalArgumentException("Null 'formatter' argument.");
        }
        this.labelFormat = labelFormat;
        this.numberFormat = null;
        this.percentFormat = NumberFormat.getPercentInstance();
        this.dateFormat = formatter;
        this.nullValueString = "-";
    }
    
    /**
     * Generates a label for the specified row.
     * 
     * @param dataset  the dataset (<code>null</code> not permitted).
     * @param row  the row index (zero-based).
     * 
     * @return The label.
     */
    public String generateRowLabel(CategoryDataset dataset, int row) {
        return dataset.getRowKey(row).toString();   
    }
    
    /**
     * Generates a label for the specified row.
     * 
     * @param dataset  the dataset (<code>null</code> not permitted).
     * @param column  the column index (zero-based).
     * 
     * @return The label.
     */
    public String generateColumnLabel(CategoryDataset dataset, int column) {
        return dataset.getColumnKey(column).toString();   
    }

    /**
     * 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 number formatter (possibly <code>null</code>).
     */
    public NumberFormat getNumberFormat() {
        return this.numberFormat;
    }

    /**
     * Returns the date formatter.
     *
     * @return The date formatter (possibly <code>null</code>).
     */
    public DateFormat getDateFormat() {
        return this.dateFormat;
    }

    /**
     * Generates a for the specified item.
     *
     * @param dataset  the dataset (<code>null</code> not permitted).
     * @param row  the row index (zero-based).
     * @param column  the column index (zero-based).
     *
     * @return The label (possibly <code>null</code>).
     */
    protected String generateLabelString(CategoryDataset dataset, 
                                         int row, int column) {
        if (dataset == null) {
            throw new IllegalArgumentException("Null 'dataset' argument.");
        }
        String result = null;   
        Object[] items = createItemArray(dataset, row, column);
        result = MessageFormat.format(this.labelFormat, items);
        return result;

    }

    /**
     * Creates the array of items that can be passed to the 
     * {@link MessageFormat} class for creating labels.
     *
     * @param dataset  the dataset (<code>null</code> not permitted).
     * @param row  the row index (zero-based).
     * @param column  the column index (zero-based).
     *
     * @return The items (never <code>null</code>).
     */
    protected Object[] createItemArray(CategoryDataset dataset, 
                                       int row, int column) {
        Object[] result = new Object[4];
        result[0] = dataset.getRowKey(row).toString();
        result[1] = dataset.getColumnKey(column).toString();
        Number value = dataset.getValue(row, column);
        if (value != null) {
            if (this.numberFormat != null) {
                result[2] = this.numberFormat.format(value);  
            }
            else if (this.dateFormat != null) {
                result[2] = this.dateFormat.format(value);
            }
        }
        else {
            result[2] = this.nullValueString;   
        }
        if (value != null) {
            double total = DataUtilities.calculateColumnTotal(dataset, column);
            double percent = value.doubleValue() / total;
            result[3] = this.percentFormat.format(percent);
        }
       
        return result;
    }

    /**
     * Tests this object for equality with an arbitrary object.
     *
     * @param obj  the other object (<code>null</code> permitted).
     *
     * @return A boolean.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof AbstractCategoryItemLabelGenerator)) {
            return false;
        }
        
        AbstractCategoryItemLabelGenerator that 
            = (AbstractCategoryItemLabelGenerator) obj;
        if (!this.labelFormat.equals(that.labelFormat)) {
            return false;
        }
        if (!ObjectUtilities.equal(this.dateFormat, that.dateFormat)) {
            return false;
        }
        if (!ObjectUtilities.equal(this.numberFormat, that.numberFormat)) {
            return false;
        }
        return true;
    }
    
    /**
     * Returns an independent copy of the generator.
     * 
     * @return A clone.
     * 
     * @throws CloneNotSupportedException  should not happen.
     */
    public Object clone() throws CloneNotSupportedException {
        AbstractCategoryItemLabelGenerator clone 
            = (AbstractCategoryItemLabelGenerator) super.clone();
        if (this.numberFormat != null) {
            clone.numberFormat = (NumberFormat) this.numberFormat.clone();
        } 
        if (this.dateFormat != null) {
            clone.dateFormat = (DateFormat) this.dateFormat.clone();
        } 
        return clone;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一级视频| 91国内精品野花午夜精品| 亚洲一区二区三区激情| 亚洲日本一区二区| 亚洲一区二区三区视频在线| 亚洲精品国产一区二区精华液 | 成人欧美一区二区三区白人| 国产精品乱码一区二区三区软件| 日本一区二区三区视频视频| 国产精品美女久久久久久| 亚洲人妖av一区二区| 一区二区三区四区在线播放| 亚洲成人午夜影院| 麻豆成人av在线| 丁香婷婷综合激情五月色| www.爱久久.com| 欧美日韩一区三区四区| 777a∨成人精品桃花网| 精品国产制服丝袜高跟| 久久精品亚洲一区二区三区浴池| 国产精品无人区| 亚洲一区欧美一区| 国内精品视频666| 色综合久久综合网| 欧美一级午夜免费电影| 久久久久久麻豆| 亚洲日本护士毛茸茸| 青青草成人在线观看| 国产69精品久久久久毛片| 欧美在线观看一区| 26uuu精品一区二区在线观看| 中文字幕一区在线观看视频| 亚洲成年人网站在线观看| 国产伦精品一区二区三区视频青涩| 成人av在线播放网址| 51午夜精品国产| 自拍偷拍欧美激情| 九色综合狠狠综合久久| 欧美亚洲综合在线| 亚洲国产精品激情在线观看| 日日夜夜免费精品视频| 北条麻妃一区二区三区| 7777精品伊人久久久大香线蕉 | 99re热视频这里只精品| 欧美一级精品在线| 亚洲精品免费一二三区| 国产综合色精品一区二区三区| 在线亚洲人成电影网站色www| 久久久久久97三级| 美日韩黄色大片| 欧美在线观看一二区| 国产精品全国免费观看高清| 蜜乳av一区二区| 色婷婷久久久久swag精品| 久久久精品国产免大香伊| 日本中文字幕不卡| 91免费观看视频| 国产精品女主播av| 成人中文字幕电影| 久久精品在这里| 国产一区二区不卡老阿姨| 日韩欧美在线观看一区二区三区| 亚洲一区二区四区蜜桃| 不卡av在线网| 国产精品激情偷乱一区二区∴| 国产一区二区调教| 久久精品男人天堂av| 国产乱码精品1区2区3区| 2021久久国产精品不只是精品| 奇米亚洲午夜久久精品| 678五月天丁香亚洲综合网| 午夜精品成人在线| 欧美精选午夜久久久乱码6080| 亚洲精品成a人| 国产盗摄视频一区二区三区| 欧美成人精品高清在线播放| 麻豆精品视频在线观看视频| 日韩午夜精品电影| 国产一区二区电影| 国产精品久久久久天堂| 9色porny自拍视频一区二区| 1区2区3区精品视频| 色婷婷精品大在线视频| 亚洲成人综合视频| 91精品国产美女浴室洗澡无遮挡| 久久激五月天综合精品| 久久色视频免费观看| 成人动漫精品一区二区| 一片黄亚洲嫩模| 欧美一区二区三区性视频| 激情五月婷婷综合| 中文字幕一区二| 欧美精品在线一区二区三区| 久久精品国产99国产精品| 久久久一区二区| av在线不卡观看免费观看| 亚洲第一搞黄网站| 久久久久久亚洲综合影院红桃 | 日本aⅴ亚洲精品中文乱码| 久久综合色8888| 91天堂素人约啪| 奇米在线7777在线精品 | 亚洲福利视频三区| 26uuu亚洲综合色| 91久久精品一区二区二区| 麻豆精品新av中文字幕| 国产精品久久久久久久第一福利| 欧美日韩三级在线| 国产精品原创巨作av| 亚洲国产日韩一级| 久久九九国产精品| 欧洲精品视频在线观看| 国产剧情一区二区| 日韩高清在线一区| 欧美激情中文字幕一区二区| 欧美日韩免费视频| 国产91精品精华液一区二区三区| 亚洲一级二级在线| 中文一区二区在线观看| 91精品国产综合久久精品麻豆| 成人一级片在线观看| 日日夜夜精品视频免费| 国产精品麻豆视频| 欧美精品一区二区三区很污很色的| 欧洲中文字幕精品| 成人午夜av影视| 国产精品99久久久久| 日韩二区在线观看| 一区二区三区在线视频观看| 国产欧美一区二区三区网站| 欧美丰满少妇xxxbbb| 一本久久精品一区二区| 国产成人精品网址| 激情深爱一区二区| 午夜精品久久久久久久久久| 亚洲人成人一区二区在线观看| 国产午夜精品在线观看| 9191久久久久久久久久久| 91成人在线精品| 风间由美中文字幕在线看视频国产欧美| 亚洲电影欧美电影有声小说| 亚洲图片欧美激情| 国产精品美女久久久久久2018| 久久精品人人爽人人爽| 精品国产自在久精品国产| 精品国产91洋老外米糕| 亚洲精品一区二区精华| 精品国产在天天线2019| 精品成人一区二区| 久久先锋影音av鲁色资源| 精品国产免费一区二区三区四区| 91麻豆精品国产91久久久久 | 国产偷v国产偷v亚洲高清 | 粉嫩一区二区三区性色av| 国产精品综合视频| 成人福利在线看| 99久久精品国产导航| 色噜噜狠狠色综合欧洲selulu| 色婷婷久久99综合精品jk白丝| 在线亚洲一区观看| 欧美日韩激情在线| 欧美一区二区三区免费视频 | 亚洲欧洲国产日韩| 亚洲精品视频在线看| 亚洲电影在线免费观看| 日韩精品成人一区二区在线| 三级影片在线观看欧美日韩一区二区| 五月天中文字幕一区二区| 奇米四色…亚洲| 国产高清精品久久久久| 国产成人av在线影院| 在线这里只有精品| 91精品国产色综合久久不卡蜜臀 | 91精品国产麻豆国产自产在线 | 午夜视频在线观看一区二区三区| 偷窥国产亚洲免费视频| 极品尤物av久久免费看| 9i在线看片成人免费| 欧美日韩免费观看一区三区| 精品国产成人系列| 中文字幕日韩一区| 男女激情视频一区| 91视频在线观看| 日韩欧美高清在线| 国产精品久久久久久久久搜平片| 亚洲电影中文字幕在线观看| 国产精品自拍三区| 欧美日韩一区视频| 国产精品视频看| 免费看欧美女人艹b| 色综合久久天天| 久久婷婷成人综合色| 丝袜诱惑亚洲看片| 成人理论电影网| 日韩亚洲欧美在线| 亚洲四区在线观看| 国产一区二区三区四区五区美女| 欧美亚洲图片小说| 中文字幕中文在线不卡住| 麻豆久久一区二区|