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

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

?? meterplottests.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? 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.]
 *
 * -------------------
 * MeterPlotTests.java
 * -------------------
 * (C) Copyright 2003-2005, by Object Refinery Limited and Contributors.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: MeterPlotTests.java,v 1.4.2.3 2005/11/10 11:19:42 mungady Exp $
 *
 * Changes
 * -------
 * 27-Mar-2003 : Version 1 (DG);
 * 12-May-2004 : Updated testEquals();
 *
 */

package org.jfree.chart.plot.junit;

import java.awt.Color;
import java.awt.Font;
import java.awt.GradientPaint;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.ObjectInput;
import java.io.ObjectInputStream;
import java.io.ObjectOutput;
import java.io.ObjectOutputStream;
import java.text.DecimalFormat;

import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import org.jfree.chart.plot.DialShape;
import org.jfree.chart.plot.MeterInterval;
import org.jfree.chart.plot.MeterPlot;
import org.jfree.data.Range;
import org.jfree.data.general.DefaultValueDataset;

/**
 * Tests for the {@link MeterPlot} class.
 */
public class MeterPlotTests extends TestCase {

    /**
     * Returns the tests as a test suite.
     *
     * @return The test suite.
     */
    public static Test suite() {
        return new TestSuite(MeterPlotTests.class);
    }

    /**
     * Constructs a new set of tests.
     *
     * @param name  the name of the tests.
     */
    public MeterPlotTests(String name) {
        super(name);
    }

    /**
     * Test the equals method to ensure that it can distinguish the required 
     * fields.  Note that the dataset is NOT considered in the equals test.
     */
    public void testEquals() {
        MeterPlot plot1 = new MeterPlot();
        MeterPlot plot2 = new MeterPlot();
        assertTrue(plot1.equals(plot2));    
        
        // units
        plot1.setUnits("mph");
        assertFalse(plot1.equals(plot2));
        plot2.setUnits("mph");
        assertTrue(plot1.equals(plot2));
        
        // range
        plot1.setRange(new Range(50.0, 70.0));
        assertFalse(plot1.equals(plot2));
        plot2.setRange(new Range(50.0, 70.0));
        assertTrue(plot1.equals(plot2));
        
        // interval
        plot1.addInterval(new MeterInterval("Normal", new Range(55.0, 60.0)));
        assertFalse(plot1.equals(plot2));
        plot2.addInterval(new MeterInterval("Normal", new Range(55.0, 60.0)));
        assertTrue(plot1.equals(plot2));
        
        // dial outline paint
        plot1.setDialOutlinePaint(new GradientPaint(1.0f, 2.0f, Color.red, 
                3.0f, 4.0f, Color.blue));
        assertFalse(plot1.equals(plot2));
        plot2.setDialOutlinePaint(new GradientPaint(1.0f, 2.0f, Color.red, 
                3.0f, 4.0f, Color.blue));
        assertTrue(plot1.equals(plot2));
        
        // dial shape
        plot1.setDialShape(DialShape.CHORD);
        assertFalse(plot1.equals(plot2));
        plot2.setDialShape(DialShape.CHORD);
        assertTrue(plot1.equals(plot2));
        
        // dial background paint
        plot1.setDialBackgroundPaint(new GradientPaint(9.0f, 8.0f, Color.red, 
                7.0f, 6.0f, Color.blue));
        assertFalse(plot1.equals(plot2));
        plot2.setDialBackgroundPaint(new GradientPaint(9.0f, 8.0f, Color.red, 
                7.0f, 6.0f, Color.blue));
        assertTrue(plot1.equals(plot2));
             
        // needle paint
        plot1.setNeedlePaint(new GradientPaint(9.0f, 8.0f, Color.red, 
                7.0f, 6.0f, Color.blue));
        assertFalse(plot1.equals(plot2));
        plot2.setNeedlePaint(new GradientPaint(9.0f, 8.0f, Color.red, 
                7.0f, 6.0f, Color.blue));
        assertTrue(plot1.equals(plot2));
        
        // value font
        plot1.setValueFont(new Font("Serif", Font.PLAIN, 6));
        assertFalse(plot1.equals(plot2));
        plot2.setValueFont(new Font("Serif", Font.PLAIN, 6));
        assertTrue(plot1.equals(plot2));
        
        // value paint
        plot1.setValuePaint(new GradientPaint(1.0f, 2.0f, Color.black, 
                3.0f, 4.0f, Color.white));
        assertFalse(plot1.equals(plot2));
        plot2.setValuePaint(new GradientPaint(1.0f, 2.0f, Color.black, 
                3.0f, 4.0f, Color.white));
        assertTrue(plot1.equals(plot2));
        
        // tick labels visible
        plot1.setTickLabelsVisible(false);
        assertFalse(plot1.equals(plot2));
        plot2.setTickLabelsVisible(false);
        assertTrue(plot1.equals(plot2));
        
        // tick label font
        plot1.setTickLabelFont(new Font("Serif", Font.PLAIN, 6));
        assertFalse(plot1.equals(plot2));
        plot2.setTickLabelFont(new Font("Serif", Font.PLAIN, 6));
        assertTrue(plot1.equals(plot2));
        
        // tick label paint
        plot1.setTickLabelPaint(Color.red);
        assertFalse(plot1.equals(plot2));
        plot2.setTickLabelPaint(Color.red);
        assertTrue(plot1.equals(plot2));        
        
        // tick label format
        plot1.setTickLabelFormat(new DecimalFormat("0"));
        assertFalse(plot1.equals(plot2));
        plot2.setTickLabelFormat(new DecimalFormat("0"));
        assertTrue(plot1.equals(plot2));
        
        // tick paint
        plot1.setTickPaint(Color.green);
        assertFalse(plot1.equals(plot2));
        plot2.setTickPaint(Color.green);
        assertTrue(plot1.equals(plot2));
        
        // tick size
        plot1.setTickSize(1.23);
        assertFalse(plot1.equals(plot2));
        plot2.setTickSize(1.23);
        assertTrue(plot1.equals(plot2));        
        
        // draw border
        plot1.setDrawBorder(!plot1.getDrawBorder());
        assertFalse(plot1.equals(plot2));
        plot2.setDrawBorder(plot1.getDrawBorder());
        assertTrue(plot1.equals(plot2));
        
        // meter angle
        plot1.setMeterAngle(22);
        assertFalse(plot1.equals(plot2));
        plot2.setMeterAngle(22);
        assertTrue(plot1.equals(plot2));
        
    }

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        MeterPlot p1 = new MeterPlot();
        MeterPlot p2 = null;
        try {
            p2 = (MeterPlot) p1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
            System.err.println("Failed to clone.");
        }
        assertTrue(p1 != p2);
        assertTrue(p1.getClass() == p2.getClass());
        assertTrue(p1.equals(p2));
        
        // the clone and the original share a reference to the SAME dataset
        assertTrue(p1.getDataset() == p2.getDataset());
        
        // try a few checks to ensure that the clone is independent of the
        // original
        p1.getTickLabelFormat().setMinimumIntegerDigits(99);
        assertFalse(p1.equals(p2));
        p2.getTickLabelFormat().setMinimumIntegerDigits(99);
        assertTrue(p1.equals(p2));
        
        p1.addInterval(new MeterInterval("Test", new Range(1.234, 5.678)));
        assertFalse(p1.equals(p2));
        p2.addInterval(new MeterInterval("Test", new Range(1.234, 5.678)));
        assertTrue(p1.equals(p2));
        
    }
    
    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization1() {
        MeterPlot p1 = new MeterPlot(null);
        MeterPlot p2 = null;
        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(p1);
            out.close();

            ObjectInput in = new ObjectInputStream(
                 new ByteArrayInputStream(buffer.toByteArray())
            );
            p2 = (MeterPlot) in.readObject();
            in.close();
        }
        catch (Exception e) {
            System.out.println(e.toString());
        }
        assertEquals(p1, p2);
    }

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization2() {
        MeterPlot p1 = new MeterPlot(new DefaultValueDataset(1.23));
        MeterPlot p2 = null;
        try {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            ObjectOutput out = new ObjectOutputStream(buffer);
            out.writeObject(p1);
            out.close();

            ObjectInput in = new ObjectInputStream(
                 new ByteArrayInputStream(buffer.toByteArray())
            );
            p2 = (MeterPlot) in.readObject();
            in.close();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        assertEquals(p1, p2);

    }
    
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久久亚洲精品一区二区三区| 91豆麻精品91久久久久久| 一区二区视频免费在线观看| 精品日韩一区二区| 91精品国产免费| 欧美乱妇23p| 欧美日韩国产不卡| 欧美精品视频www在线观看| 色婷婷久久久亚洲一区二区三区 | 国产一区二区三区久久悠悠色av| 首页亚洲欧美制服丝腿| 亚洲精品久久7777| 亚洲国产毛片aaaaa无费看| 一区二区三区四区视频精品免费| 亚洲视频免费看| 日韩理论片中文av| 亚洲一区二区黄色| 午夜激情久久久| 午夜在线成人av| 美脚の诱脚舐め脚责91| 精品一区二区精品| 国产成人8x视频一区二区| 成人美女视频在线看| 色综合久久久久久久久| 欧美日韩免费高清一区色橹橹| 欧美日韩精品一区二区三区四区| 欧美一区二区三区日韩| 久久精品综合网| 亚洲欧美综合在线精品| 亚洲韩国精品一区| 经典三级一区二区| www.66久久| 欧美一区二区三区四区高清 | 欧美三级电影在线观看| 精品久久久久久久久久久院品网| 日韩欧美一级二级三级久久久| 久久综合视频网| 国产精品久久综合| 亚洲成年人影院| 国产在线一区观看| 色综合久久久网| 日韩欧美在线1卡| 中文字幕视频一区| 肉色丝袜一区二区| 成人丝袜视频网| 欧美日本韩国一区二区三区视频| 精品国产区一区| 亚洲黄色录像片| 国产乱人伦精品一区二区在线观看| 91免费国产在线| 久久女同性恋中文字幕| 一区二区国产盗摄色噜噜| 韩国中文字幕2020精品| 在线视频你懂得一区二区三区| 91精品国产综合久久精品性色| 国产精品污网站| 久久国产精品色婷婷| 91国偷自产一区二区三区观看| 欧美v日韩v国产v| 夜夜嗨av一区二区三区| 国产电影一区在线| 91麻豆精品国产综合久久久久久| 欧美国产精品v| 久久精品免费观看| 欧美日韩在线三区| 国产精品久久久久国产精品日日| 奇米亚洲午夜久久精品| 欧洲中文字幕精品| 亚洲欧美日韩一区二区 | 26uuu国产日韩综合| 亚洲观看高清完整版在线观看| 国产suv一区二区三区88区| 日韩视频在线你懂得| 亚洲成人激情社区| 色婷婷亚洲综合| 亚洲欧洲一区二区三区| 国产夫妻精品视频| 精品国产乱码久久久久久夜甘婷婷| 亚洲国产日韩一区二区| 色悠悠久久综合| 国产精品护士白丝一区av| 国产精选一区二区三区| 欧美电影免费观看高清完整版在 | 91精品久久久久久蜜臀| 亚洲国产美国国产综合一区二区| 色综合久久中文综合久久牛| 亚洲欧美自拍偷拍色图| 99re这里只有精品首页| 一区在线播放视频| 色综合久久综合网欧美综合网| 亚洲视频在线观看一区| 北岛玲一区二区三区四区| 中文字幕一区二区三区色视频| 国产999精品久久久久久绿帽| 国产亚洲短视频| 国产精品一品视频| 国产欧美日韩三级| 99久久久国产精品| 亚洲一区在线观看免费观看电影高清| 色播五月激情综合网| 亚洲午夜av在线| 日韩视频国产视频| 国产成人免费av在线| 《视频一区视频二区| 欧美日韩大陆一区二区| 日本不卡视频在线| 国产视频911| 色八戒一区二区三区| 水蜜桃久久夜色精品一区的特点| 日韩精品一区二区三区在线 | 日本在线不卡视频| 精品成人私密视频| av中文字幕不卡| 亚洲国产色一区| 久久久精品国产99久久精品芒果| 99精品视频在线观看免费| 亚洲精品国产无天堂网2021| 欧美精品久久一区二区三区| 国产在线一区二区| 日韩码欧中文字| 精品日韩成人av| 色哟哟日韩精品| 极品少妇xxxx精品少妇偷拍| 亚洲欧洲日韩av| 91精品国产一区二区三区蜜臀| 国产裸体歌舞团一区二区| 自拍偷拍亚洲欧美日韩| 51久久夜色精品国产麻豆| www.欧美色图| 欧美aⅴ一区二区三区视频| 国产精品久久久久一区二区三区 | 国产亚洲精品aa午夜观看| 欧美性猛片aaaaaaa做受| 国产综合色视频| 一区二区三区精密机械公司| 久久免费偷拍视频| 欧美日本一区二区三区四区 | 蜜臀a∨国产成人精品| 亚洲欧美在线观看| 26uuu亚洲综合色| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 欧美卡1卡2卡| 成人av网站在线观看免费| 日本成人在线看| 亚洲视频免费观看| 国产三级一区二区| 日韩欧美中文字幕公布| 欧美三级乱人伦电影| 99九九99九九九视频精品| 国产一区二区在线免费观看| 午夜精品福利一区二区蜜股av | 99精品国产热久久91蜜凸| 激情综合网天天干| 性感美女久久精品| 一区二区三区四区蜜桃| 中文字幕不卡一区| 久久日韩粉嫩一区二区三区| 日韩欧美高清dvd碟片| 欧美日韩电影一区| 欧美无砖砖区免费| 在线视频欧美精品| 色狠狠一区二区| 色婷婷综合久久久久中文| av资源站一区| 91在线观看免费视频| 成人免费视频网站在线观看| 国产在线精品视频| 久久se精品一区精品二区| 日本一区中文字幕| 强制捆绑调教一区二区| 美女www一区二区| 久久精品久久99精品久久| 美女看a上一区| 久久99国产精品免费| 麻豆国产精品一区二区三区| 日本欧美一区二区| 免费一区二区视频| 狂野欧美性猛交blacked| 看电影不卡的网站| 国产一区二区女| 夫妻av一区二区| heyzo一本久久综合| 91蝌蚪国产九色| 欧洲精品一区二区| 日韩一区二区三区在线视频| 精品区一区二区| 久久精子c满五个校花| 国产精品乱码久久久久久| 亚洲三级电影网站| 香蕉久久夜色精品国产使用方法 | 日本不卡在线视频| 视频精品一区二区| 精品一区二区三区av| 国产成人啪免费观看软件| 99综合电影在线视频| 欧美日韩亚洲另类| 精品88久久久久88久久久| 国产精品久久综合| 亚洲6080在线| 国产成人啪午夜精品网站男同|