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

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

?? thermometerplot.java

?? jfreechart1.0.1 jsp繪制圖表的開發包
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/* ===========================================================
 * 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.]
 *
 * --------------------
 * ThermometerPlot.java
 * --------------------
 *
 * (C) Copyright 2000-2005, by Bryan Scott and Contributors.
 *
 * Original Author:  Bryan Scott (based on MeterPlot by Hari).
 * Contributor(s):   David Gilbert (for Object Refinery Limited).
 *                   Arnaud Lelievre;
 *
 * Changes
 * -------
 * 11-Apr-2002 : Version 1, contributed by Bryan Scott;
 * 15-Apr-2002 : Changed to implement VerticalValuePlot;
 * 29-Apr-2002 : Added getVerticalValueAxis() method (DG);
 * 25-Jun-2002 : Removed redundant imports (DG);
 * 17-Sep-2002 : Reviewed with Checkstyle utility (DG);
 * 18-Sep-2002 : Extensive changes made to API, to iron out bugs and 
 *               inconsistencies (DG);
 * 13-Oct-2002 : Corrected error datasetChanged which would generate exceptions
 *               when value set to null (BRS).
 * 23-Jan-2003 : Removed one constructor (DG);
 * 26-Mar-2003 : Implemented Serializable (DG);
 * 02-Jun-2003 : Removed test for compatible range axis (DG);
 * 01-Jul-2003 : Added additional check in draw method to ensure value not 
 *               null (BRS);
 * 08-Sep-2003 : Added internationalization via use of properties 
 *               resourceBundle (RFE 690236) (AL);
 * 16-Sep-2003 : Changed ChartRenderingInfo --> PlotRenderingInfo (DG);
 * 29-Sep-2003 : Updated draw to set value of cursor to non-zero and allow 
 *               painting of axis.  An incomplete fix and needs to be set for 
 *               left or right drawing (BRS);
 * 19-Nov-2003 : Added support for value labels to be displayed left of the 
 *               thermometer
 * 19-Nov-2003 : Improved axis drawing (now default axis does not draw axis line
 *               and is closer to the bulb).  Added support for the positioning
 *               of the axis to the left or right of the bulb. (BRS);
 * 03-Dec-2003 : Directly mapped deprecated setData()/getData() method to 
 *               get/setDataset() (TM);
 * 21-Jan-2004 : Update for renamed method in ValueAxis (DG);
 * 07-Apr-2004 : Changed string width calculation (DG);
 * 12-Nov-2004 : Implemented the new Zoomable interface (DG);
 * 06-Jan-2004 : Added getOrientation() method (DG);
 * 11-Jan-2005 : Removed deprecated code in preparation for 1.0.0 release (DG);
 * 29-Mar-2005 : Fixed equals() method (DG);
 * 05-May-2005 : Updated draw() method parameters (DG);
 * 09-Jun-2005 : Fixed more bugs in equals() method (DG);
 * 10-Jun-2005 : Fixed minor bug in setDisplayRange() method (DG);
 * 
 */

package org.jfree.chart.plot;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.Area;
import java.awt.geom.Ellipse2D;
import java.awt.geom.Line2D;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.geom.RoundRectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;
import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Arrays;
import java.util.ResourceBundle;

import org.jfree.chart.LegendItemCollection;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.event.PlotChangeEvent;
import org.jfree.data.Range;
import org.jfree.data.general.DatasetChangeEvent;
import org.jfree.data.general.DefaultValueDataset;
import org.jfree.data.general.ValueDataset;
import org.jfree.io.SerialUtilities;
import org.jfree.ui.RectangleEdge;
import org.jfree.ui.RectangleInsets;
import org.jfree.util.ObjectUtilities;
import org.jfree.util.PaintUtilities;
import org.jfree.util.UnitType;

/**
 * A plot that displays a single value (from a {@link ValueDataset}) in a 
 * thermometer type display.
 * <p>
 * This plot supports a number of options:
 * <ol>
 * <li>three sub-ranges which could be viewed as 'Normal', 'Warning' 
 *   and 'Critical' ranges.</li>
 * <li>the thermometer can be run in two modes:
 *      <ul>
 *      <li>fixed range, or</li>
 *      <li>range adjusts to current sub-range.</li>
 *      </ul>
 * </li>
 * <li>settable units to be displayed.</li>
 * <li>settable display location for the value text.</li>
 * </ol>
 *
 * @author Bryan Scott
 */
public class ThermometerPlot extends Plot implements ValueAxisPlot,
                                                     Zoomable,
                                                     Cloneable,
                                                     Serializable {

    /** For serialization. */
    private static final long serialVersionUID = 4087093313147984390L;
    
    /** A constant for unit type 'None'. */
    public static final int UNITS_NONE = 0;

    /** A constant for unit type 'Fahrenheit'. */
    public static final int UNITS_FAHRENHEIT = 1;

    /** A constant for unit type 'Celcius'. */
    public static final int UNITS_CELCIUS = 2;

    /** A constant for unit type 'Kelvin'. */
    public static final int UNITS_KELVIN = 3;

    /** A constant for the value label position (no label). */
    public static final int NONE = 0;

    /** A constant for the value label position (right of the thermometer). */
    public static final int RIGHT = 1;

    /** A constant for the value label position (left of the thermometer). */
    public static final int LEFT = 2;

    /** A constant for the value label position (in the thermometer bulb). */
    public static final int BULB = 3;

    /** A constant for the 'normal' range. */
    public static final int NORMAL = 0;

    /** A constant for the 'warning' range. */
    public static final int WARNING = 1;

    /** A constant for the 'critical' range. */
    public static final int CRITICAL = 2;

    /** The bulb radius. */
    protected static final int BULB_RADIUS = 40;

    /** The bulb diameter. */
    protected static final int BULB_DIAMETER = BULB_RADIUS * 2;

    /** The column radius. */
    protected static final int COLUMN_RADIUS = 20;

    /** The column diameter.*/
    protected static final int COLUMN_DIAMETER = COLUMN_RADIUS * 2;

    /** The gap radius. */
    protected static final int GAP_RADIUS = 5;

    /** The gap diameter. */
    protected static final int GAP_DIAMETER = GAP_RADIUS * 2;

    /** The axis gap. */
    protected static final int AXIS_GAP = 10;

    /** The unit strings. */
    protected static final String[] UNITS 
        = {"", "\u00B0F", "\u00B0C", "\u00B0K"};

    /** Index for low value in subrangeInfo matrix. */
    protected static final int RANGE_LOW = 0;

    /** Index for high value in subrangeInfo matrix. */
    protected static final int RANGE_HIGH = 1;

    /** Index for display low value in subrangeInfo matrix. */
    protected static final int DISPLAY_LOW = 2;

    /** Index for display high value in subrangeInfo matrix. */
    protected static final int DISPLAY_HIGH = 3;

    /** The default lower bound. */
    protected static final double DEFAULT_LOWER_BOUND = 0.0;

    /** The default upper bound. */
    protected static final double DEFAULT_UPPER_BOUND = 100.0;

    /** The dataset for the plot. */
    private ValueDataset dataset;

    /** The range axis. */
    private ValueAxis rangeAxis;

    /** The lower bound for the thermometer. */
    private double lowerBound = DEFAULT_LOWER_BOUND;

    /** The upper bound for the thermometer. */
    private double upperBound = DEFAULT_UPPER_BOUND;

    /** 
     * Blank space inside the plot area around the outside of the thermometer. 
     */
    private RectangleInsets padding;

    /** Stroke for drawing the thermometer */
    private transient Stroke thermometerStroke = new BasicStroke(1.0f);

    /** Paint for drawing the thermometer */
    private transient Paint thermometerPaint = Color.black;

    /** The display units */
    private int units = UNITS_CELCIUS;

    /** The value label position. */
    private int valueLocation = BULB;

    /** The position of the axis **/
    private int axisLocation = LEFT;

    /** The font to write the value in */
    private Font valueFont = new Font("SansSerif", Font.BOLD, 16);

    /** Colour that the value is written in */
    private transient Paint valuePaint = Color.white;

    /** Number format for the value */
    private NumberFormat valueFormat = new DecimalFormat();

    /** The default paint for the mercury in the thermometer. */
    private transient Paint mercuryPaint = Color.lightGray;

    /** A flag that controls whether value lines are drawn. */
    private boolean showValueLines = false;

    /** The display sub-range. */
    private int subrange = -1;

    /** The start and end values for the subranges. */
    private double[][] subrangeInfo = {
        {0.0, 50.0, 0.0, 50.0}, 
        {50.0, 75.0, 50.0, 75.0}, 
        {75.0, 100.0, 75.0, 100.0}
    };

    /** 
     * A flag that controls whether or not the axis range adjusts to the 
     * sub-ranges. 
     */
    private boolean followDataInSubranges = false;

    /** 
     * A flag that controls whether or not the mercury paint changes with 
     * the subranges. 
     */
    private boolean useSubrangePaint = true;

    /** Paint for each range */
    private Paint[] subrangePaint = {
        Color.green,
        Color.orange,
        Color.red
    };

    /** A flag that controls whether the sub-range indicators are visible. */
    private boolean subrangeIndicatorsVisible = true;

    /** The stroke for the sub-range indicators. */
    private transient Stroke subrangeIndicatorStroke = new BasicStroke(2.0f);

    /** The range indicator stroke. */
    private transient Stroke rangeIndicatorStroke = new BasicStroke(3.0f);

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

    /**
     * Creates a new thermometer plot.
     */
    public ThermometerPlot() {
        this(new DefaultValueDataset());
    }

    /**
     * Creates a new thermometer plot, using default attributes where necessary.
     *
     * @param dataset  the data set.
     */
    public ThermometerPlot(ValueDataset dataset) {

        super();

        this.padding = new RectangleInsets(
            UnitType.RELATIVE, 0.05, 0.05, 0.05, 0.05
        );
        this.dataset = dataset;
        if (dataset != null) {
            dataset.addChangeListener(this);
        }
        NumberAxis axis = new NumberAxis(null);
        axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
        axis.setAxisLineVisible(false);

        setRangeAxis(axis);
        setAxisRange();
    }

    /**
     * Returns the primary dataset for the plot.
     *
     * @return The primary dataset (possibly <code>null</code>).
     */
    public ValueDataset getDataset() {
        return this.dataset;
    }

    /**
     * Sets the dataset for the plot, replacing the existing dataset if there 
     * is one.
     *
     * @param dataset  the dataset (<code>null</code> permitted).
     */
    public void setDataset(ValueDataset dataset) {

        // if there is an existing dataset, remove the plot from the list 
        // of change listeners...
        ValueDataset existing = this.dataset;
        if (existing != null) {
            existing.removeChangeListener(this);
        }

        // set the new dataset, and register the chart as a change listener...
        this.dataset = dataset;
        if (dataset != null) {
            setDatasetGroup(dataset.getGroup());
            dataset.addChangeListener(this);
        }

        // send a dataset change event to self...
        DatasetChangeEvent event = new DatasetChangeEvent(this, dataset);
        datasetChanged(event);

    }

    /**

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产一区二区三区美女| 69久久99精品久久久久婷婷| 亚洲午夜激情网页| 777亚洲妇女| 欧美男女性生活在线直播观看 | 成人av网站在线观看免费| 久久久久97国产精华液好用吗| 日韩精品一二三区| 中文字幕亚洲区| 精品免费日韩av| 欧美极品另类videosde| 国产一区二区三区av电影 | 美女一区二区在线观看| 欧美午夜电影网| 肉色丝袜一区二区| 久久亚洲春色中文字幕久久久| 亚洲一区视频在线| 日韩一区二区三区电影在线观看| 国产精品乱子久久久久| 99久久婷婷国产精品综合| 一区二区三区在线播放| 欧美日本在线一区| 国产精品自拍三区| 亚洲激情在线激情| 日韩欧美国产综合| caoporm超碰国产精品| 亚洲一二三专区| 国产日产精品1区| 欧美伊人久久久久久午夜久久久久| 中文字幕在线视频一区| 欧美日韩www| 国产成人av电影在线播放| 国产精品久久久久久久久久久免费看 | 538在线一区二区精品国产| 韩日av一区二区| 一区二区三区在线免费观看| 欧美一级欧美一级在线播放| 成人高清视频在线| 日韩**一区毛片| 亚洲欧洲av在线| 日韩色视频在线观看| 国产成人免费网站| 国产精品私人影院| 日韩不卡一区二区三区 | 91网上在线视频| 欧美日韩一区精品| 综合久久久久久久| 99久久伊人精品| 欧美精品丝袜中出| 中文字幕日韩av资源站| 亚洲精品老司机| 精品国精品国产尤物美女| 亚洲欧美日韩国产另类专区| 欧美一区二区三区视频在线观看| 日韩女优电影在线观看| 成人爱爱电影网址| 亚洲成在线观看| 亚洲视频在线一区观看| 久久久www免费人成精品| 在线观看亚洲精品视频| 国产福利一区二区三区视频| 天天影视网天天综合色在线播放 | 国产99久久久国产精品| 毛片av一区二区三区| 亚洲成年人影院| 中文字幕视频一区二区三区久| 99re视频精品| 成人动漫中文字幕| 成人国产在线观看| 国产成人精品三级麻豆| 国产伦精一区二区三区| 午夜a成v人精品| 亚洲电影一区二区| 夜夜嗨av一区二区三区四季av| 欧美精品粉嫩高潮一区二区| 91网站最新网址| 一本大道久久精品懂色aⅴ| av一区二区三区四区| www.av精品| 91视频国产资源| 91美女在线视频| 色婷婷综合在线| 欧美日韩激情一区二区| 欧洲一区二区三区在线| 欧美在线999| 欧美日韩国产成人在线91| 欧美日韩午夜影院| 欧美乱妇23p| 日韩视频免费观看高清在线视频| 99久久精品国产导航| 成人免费视频播放| 91在线观看下载| 欧美视频自拍偷拍| 91精品国产免费| 欧美久久一区二区| 欧美一区二区人人喊爽| 久久久五月婷婷| 亚洲国产乱码最新视频| 最新国产成人在线观看| 国产蜜臀av在线一区二区三区| 亚洲一区二区三区国产| 久久精品视频一区| 亚洲欧洲www| 国产精品久久久久永久免费观看| 亚洲国产精品影院| 老司机精品视频在线| 日韩电影在线一区| 国产在线国偷精品产拍免费yy| 亚洲精品国产第一综合99久久| 欧美mv和日韩mv的网站| 欧美经典一区二区| 亚洲午夜一区二区三区| 日韩av在线发布| 国产精品1区二区.| 精品视频999| 久久久久久久久一| 一区二区三区四区中文字幕| 日韩—二三区免费观看av| 国产精品一区二区在线观看网站| 亚洲超碰精品一区二区| 蜜桃视频在线一区| 91丝袜国产在线播放| 日韩欧美成人激情| 一区二区三区高清不卡| 国产毛片精品一区| 欧美日韩卡一卡二| 中文字幕av一区二区三区免费看| 国产日本亚洲高清| 水蜜桃久久夜色精品一区的特点 | 91久久奴性调教| 欧美va亚洲va香蕉在线| 亚洲人成网站影音先锋播放| 经典一区二区三区| 欧美亚洲综合在线| 国产欧美日韩精品在线| 亚洲一级不卡视频| av在线不卡电影| 久久精品水蜜桃av综合天堂| 污片在线观看一区二区| av在线不卡免费看| 国产色产综合色产在线视频| 蜜臀久久99精品久久久久久9| 久久精品国产精品亚洲综合| 一本大道综合伊人精品热热 | 色乱码一区二区三区88| 亚洲精品在线免费播放| 午夜影院久久久| 色综合久久99| 国产精品免费久久| 精品一区二区国语对白| 欧美一区二区三区系列电影| 亚洲精品国产a| 亚洲欧洲日产国产综合网| 国产成人免费在线视频| 国产91清纯白嫩初高中在线观看 | 久久精品一区二区三区不卡牛牛| 国产成人亚洲精品青草天美| 日韩三级精品电影久久久 | 在线观看中文字幕不卡| 不卡一区二区在线| 在线播放91灌醉迷j高跟美女| 欧美一区二区三区在线视频| 亚洲欧美电影院| 成人av在线播放网站| 亚洲国产精品成人综合| 国产河南妇女毛片精品久久久| 91影视在线播放| 一区二区中文字幕在线| 91同城在线观看| 亚洲人精品午夜| 成人晚上爱看视频| 国产精品久久久久久久久果冻传媒 | 一区二区高清在线| 97久久精品人人爽人人爽蜜臀| 色综合婷婷久久| 亚洲精品水蜜桃| 欧洲精品在线观看| 天堂影院一区二区| 日韩一区二区三免费高清| 免费xxxx性欧美18vr| 欧美大片顶级少妇| 国内精品伊人久久久久av一坑| 国内外成人在线| 精品国产网站在线观看| 国产综合成人久久大片91| 中文在线一区二区| 色综合天天综合色综合av| 一区二区三区中文字幕| 欧美猛男gaygay网站| 久久精品噜噜噜成人av农村| 久久嫩草精品久久久精品| 成人黄色片在线观看| 一区av在线播放| 91麻豆精品国产无毒不卡在线观看 | 日韩午夜精品电影| 丁香六月久久综合狠狠色| 亚洲欧美色综合| 欧美肥妇毛茸茸| 国产乱子伦视频一区二区三区| 欧美亚洲自拍偷拍|