亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
中文字幕欧美一区| 麻豆成人久久精品二区三区小说| 亚洲综合免费观看高清完整版在线 | 日韩va亚洲va欧美va久久| 国产福利91精品一区| 欧美在线视频不卡| 欧美国产日产图区| 国产精品综合一区二区| 在线成人免费观看| 一区二区三区中文字幕| 成人美女在线视频| 欧美精品一区二区三区很污很色的 | 欧美久久婷婷综合色| 亚洲视频在线一区| 成人av在线一区二区| 2023国产一二三区日本精品2022| 亚洲第一激情av| 91色|porny| 亚洲免费在线视频| 91玉足脚交白嫩脚丫在线播放| 久久精品一区二区三区不卡| 久热成人在线视频| 精品久久99ma| 麻豆成人久久精品二区三区红 | 成人在线视频首页| 久久综合色婷婷| 久久超碰97中文字幕| 欧美一级电影网站| 日韩成人免费在线| 日韩欧美视频在线| 美腿丝袜一区二区三区| 日韩视频一区二区三区在线播放 | 国内久久婷婷综合| 国产日韩欧美在线一区| 午夜精品久久一牛影视| 6080国产精品一区二区| 亚洲va天堂va国产va久| 欧美精品乱人伦久久久久久| 午夜电影久久久| 欧美一区二区三区在线| 玖玖九九国产精品| 国产人成一区二区三区影院| 成人午夜视频网站| 亚洲与欧洲av电影| 欧美一区二区精品在线| 久久99精品久久久久久动态图 | 欧美日韩国产另类不卡| 亚洲成av人片一区二区| 日韩精品一区国产麻豆| 国产专区欧美精品| 日韩美女精品在线| 欧美久久久久久久久久| 麻豆成人综合网| 中文字幕在线不卡一区| 色国产精品一区在线观看| 视频在线观看国产精品| 久久久综合激的五月天| 99精品欧美一区| 婷婷激情综合网| 久久久久久久久久久久久夜| 菠萝蜜视频在线观看一区| 亚洲国产va精品久久久不卡综合| 日韩女优av电影在线观看| www.日韩大片| 日韩和欧美一区二区| 久久视频一区二区| 91精彩视频在线| 久草中文综合在线| 亚洲欧洲综合另类| 欧美大片国产精品| 99精品一区二区三区| 久久精品国产第一区二区三区| 中文无字幕一区二区三区 | 亚洲综合在线免费观看| 欧美一级理论性理论a| 国产一区二区不卡在线| 亚洲韩国精品一区| 国产精品网站在线观看| 欧美人妇做爰xxxⅹ性高电影 | 亚洲国产精品ⅴa在线观看| 欧美色大人视频| 成人黄色片在线观看| 日韩高清不卡一区| 亚洲视频一区在线观看| 精品国产电影一区二区| 欧美日韩一级片网站| www.亚洲免费av| 国产麻豆精品在线| 日本欧美一区二区三区| 亚洲一区二区欧美日韩 | 懂色av一区二区三区蜜臀| 日本在线不卡视频| 有码一区二区三区| 国产午夜精品久久久久久免费视 | 国产精品一区免费视频| 亚洲一区二区三区三| 国产欧美日本一区视频| 精品免费国产一区二区三区四区| 色偷偷一区二区三区| 大白屁股一区二区视频| 国产一区二区三区免费在线观看| 三级亚洲高清视频| 石原莉奈在线亚洲二区| 亚洲国产综合91精品麻豆 | 久久老女人爱爱| 日韩欧美美女一区二区三区| 欧美精品久久99久久在免费线| 色欲综合视频天天天| 91免费看`日韩一区二区| 成人国产免费视频| 国产成人一级电影| 国产精品自产自拍| 国产一区二区三区不卡在线观看| 久久国产乱子精品免费女| 日韩av一级电影| 日韩二区三区四区| 日本在线不卡视频一二三区| 欧美aa在线视频| 另类的小说在线视频另类成人小视频在线| 视频一区视频二区在线观看| 日韩高清中文字幕一区| 日本伊人色综合网| 日本欧美大码aⅴ在线播放| 日韩精品五月天| 久久电影网站中文字幕| 国产一区二区不卡在线| 福利一区福利二区| 色综合久久88色综合天天免费| 99久久综合色| 欧美日韩一卡二卡| 日韩欧美123| 亚洲国产精品激情在线观看| 亚洲欧洲日产国产综合网| 一区二区三区**美女毛片| 午夜久久久影院| 国产黄色精品网站| 色哟哟一区二区| 欧美一区二区三区喷汁尤物| 精品国产一区二区精华| 国产精品免费视频观看| 亚洲在线观看免费| 久久国产精品99久久人人澡| 成人性生交大合| 欧美色综合天天久久综合精品| 69精品人人人人| 国产精品网站一区| 午夜精品一区在线观看| 国产毛片精品视频| 在线观看av一区二区| 久久一区二区三区国产精品| 亚洲男人天堂一区| 国产在线国偷精品免费看| 99精品视频在线观看免费| 欧美一区二区成人| 亚洲欧洲中文日韩久久av乱码| 日本美女一区二区三区视频| 不卡一区二区在线| 精品成人在线观看| 一区二区三区欧美亚洲| 韩国v欧美v日本v亚洲v| 欧美三级电影在线观看| 国产日韩欧美制服另类| 青青国产91久久久久久 | 9191精品国产综合久久久久久| 久久综合999| 午夜精品一区二区三区电影天堂 | 欧美精品一区二区三区蜜桃 | 国产精品久久久久7777按摩| 日韩国产高清在线| 91黄视频在线| 国产精品网曝门| 国模一区二区三区白浆| 欧美日韩精品高清| 亚洲欧洲av一区二区三区久久| 麻豆精品新av中文字幕| 欧美性受xxxx黑人xyx| 国产精品国产自产拍高清av王其| 日本aⅴ精品一区二区三区| 色就色 综合激情| 亚洲欧美自拍偷拍色图| 国产精品一区二区在线播放 | 欧美人伦禁忌dvd放荡欲情| 亚洲免费成人av| 99久久免费精品| 国产精品高清亚洲| 高清成人免费视频| 久久精品视频在线看| 九九热在线视频观看这里只有精品| 91久久线看在观草草青青| 亚洲欧美自拍偷拍色图| 99久久免费国产| 亚洲欧美欧美一区二区三区| 成人免费三级在线| 国产精品色在线| 国产·精品毛片| 欧美激情艳妇裸体舞| 国产精品影视在线| 国产欧美一区在线| 91在线观看一区二区| 自拍偷拍欧美精品|