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

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

?? thermometerplot.java

?? 制作圖表的好工具
?? 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一区二区三区免费野_久草精品视频
国产日本亚洲高清| 亚洲成人av一区二区| 国产精品入口麻豆九色| 亚洲视频中文字幕| 香蕉乱码成人久久天堂爱免费| 亚洲国产一区二区在线播放| 国产成人激情av| 99国产精品久久久久久久久久| 国产不卡高清在线观看视频| 成人av网站在线| 7777精品伊人久久久大香线蕉的| 国产三级精品三级在线专区| 亚洲一级电影视频| 国产成人a级片| 制服丝袜亚洲网站| 亚洲精品乱码久久久久久久久| 麻豆精品一区二区av白丝在线| av网站免费线看精品| 日韩午夜av一区| 精品不卡在线视频| 亚洲狠狠爱一区二区三区| 国产91在线观看丝袜| 精品国产sm最大网站| 亚洲国产成人高清精品| 色综合久久99| 亚洲欧美日韩在线| 国产一区二区三区久久悠悠色av | 久久99在线观看| 色综合欧美在线| 国产欧美一区二区三区网站| 美女精品一区二区| 欧美www视频| 日韩福利视频导航| 4438x成人网最大色成网站| 亚洲一区在线观看免费| 色噜噜久久综合| 综合分类小说区另类春色亚洲小说欧美| 另类小说欧美激情| 久久久五月婷婷| a美女胸又www黄视频久久| 一区精品在线播放| 欧美少妇一区二区| 日本vs亚洲vs韩国一区三区二区| 3atv一区二区三区| 国产毛片精品国产一区二区三区| 国产日韩欧美精品综合| 91首页免费视频| 亚洲国产精品天堂| 欧美一区二区视频在线观看2020| 精品在线观看视频| 一区二区三区精品在线观看| 日韩视频在线一区二区| 东方欧美亚洲色图在线| 亚洲在线视频一区| 国产午夜精品久久| 日韩一区二区免费高清| 91成人看片片| 国产精品91xxx| 裸体一区二区三区| 亚洲一区影音先锋| 久久久国产午夜精品 | 精品国产区一区| 成人动漫在线一区| 韩日av一区二区| 亚洲激情在线播放| 久久久精品免费免费| 日韩一区二区在线看| 色综合久久中文字幕| 国产酒店精品激情| 久久久美女毛片| 亚洲精品精品亚洲| 国产日韩欧美综合在线| 欧美一个色资源| 欧美人动与zoxxxx乱| 色香色香欲天天天影视综合网 | 精品写真视频在线观看| 日本在线不卡一区| 亚洲精品亚洲人成人网在线播放| 国产日韩欧美精品一区| 久久婷婷久久一区二区三区| 欧美一区二区不卡视频| 欧美videos大乳护士334| 欧美一区二区播放| 久久视频一区二区| 久久久国产精品不卡| 国产亚洲一区二区在线观看| 午夜av一区二区三区| 美女网站视频久久| 高清在线观看日韩| 在线视频你懂得一区二区三区| 欧美日韩高清在线播放| 日韩欧美不卡在线观看视频| 久久久久国产精品人| 综合分类小说区另类春色亚洲小说欧美| 中文字幕一区av| 久久国内精品自在自线400部| 成人黄页毛片网站| 91精品国产综合久久福利软件| 精品99一区二区三区| 香蕉av福利精品导航| 欧美大片免费久久精品三p| 中文字幕精品一区| 美女一区二区视频| 一本一本大道香蕉久在线精品| 91精品国产综合久久精品麻豆 | 九色porny丨国产精品| 91福利在线播放| 久久影院午夜论| 亚洲超碰97人人做人人爱| 9人人澡人人爽人人精品| 26uuu久久天堂性欧美| 久久精品一区四区| 一级精品视频在线观看宜春院| 日韩成人一级片| 97se亚洲国产综合在线| 欧美精品一卡二卡| 亚洲国产精品ⅴa在线观看| 亚洲国产日韩综合久久精品| 91毛片在线观看| 天堂资源在线中文精品| 久久精品亚洲精品国产欧美| 成人午夜av影视| 美女在线视频一区| 一区二区中文视频| 欧美日韩和欧美的一区二区| 亚洲精品五月天| 欧美性猛交xxxxxx富婆| 亚洲一级电影视频| 在线成人免费视频| 国产中文字幕精品| 中文字幕欧美三区| 在线一区二区三区做爰视频网站| 亚洲欧洲一区二区在线播放| 91黄色激情网站| 午夜精品爽啪视频| 久久精品亚洲国产奇米99| 国产99久久久国产精品免费看| 亚洲国产高清在线观看视频| 91亚洲国产成人精品一区二三| 亚洲综合一二区| 日韩欧美123| 91丝袜美腿高跟国产极品老师| 亚洲精品中文在线| 精品国产免费一区二区三区四区| 国产精品99久久久久久久vr| 一个色妞综合视频在线观看| 久久久久国产精品麻豆 | 国产成人在线视频网址| 亚洲午夜激情av| 中文字幕一区二区三区四区不卡 | 国产日本欧洲亚洲| 精品捆绑美女sm三区| 欧美一区二区女人| 91久久精品一区二区三| 成人av网址在线观看| 国产丶欧美丶日本不卡视频| 蜜乳av一区二区| 日韩1区2区日韩1区2区| 亚洲成人久久影院| 欧美精品电影在线播放| 成人动漫在线一区| 久久99久久99| 免费国产亚洲视频| 午夜影院久久久| 亚洲v日本v欧美v久久精品| 亚洲成人av一区二区三区| 偷拍亚洲欧洲综合| 日韩精品色哟哟| 免费的成人av| 99视频精品在线| 99久久婷婷国产综合精品| 99riav久久精品riav| 欧美伊人久久久久久久久影院 | 99久久精品一区二区| 欧美三级欧美一级| 久久免费看少妇高潮| 国产精品色噜噜| 麻豆久久久久久| 午夜欧美电影在线观看| 精品国产自在久精品国产| 综合激情网...| 久久av老司机精品网站导航| 欧美在线视频全部完| 欧美激情综合网| 国内精品伊人久久久久av一坑 | 欧美国产综合色视频| 天天色天天操综合| 日本乱人伦一区| 国产女主播一区| 国产福利精品一区二区| 日韩欧美国产精品一区| 天堂av在线一区| 欧美亚洲综合另类| 欧美精品一区二区三区在线播放| 精品国产乱子伦一区| 亚洲人成在线播放网站岛国| 奇米影视7777精品一区二区| av一区二区久久| 久久蜜桃一区二区| 日韩黄色免费电影|