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

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

?? categoryplottests.java

?? Web圖形化的Java庫
?? JAVA
字號:
/* ======================================
 * JFreeChart : a free Java chart library
 * ======================================
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 * Project Lead:  David Gilbert (david.gilbert@object-refinery.com);
 *
 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
 *
 * 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., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * ----------------------
 * CategoryPlotTests.java
 * ----------------------
 * (C) Copyright 2003 by Object Refinery Limited and Contributors.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: CategoryPlotTests.java,v 1.9 2003/08/20 11:58:09 mungady Exp $
 *
 * Changes
 * -------
 * 26-Mar-2003 : Version 1 (DG);
 *
 */

package org.jfree.chart.plot.junit;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Stroke;
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 junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;

import org.jfree.chart.Marker;
import org.jfree.chart.Spacer;
import org.jfree.chart.annotations.CategoryTextAnnotation;
import org.jfree.chart.axis.AxisLocation;
import org.jfree.chart.axis.CategoryAnchor;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.NumberAxis;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.DatasetRenderingOrder;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.renderer.AreaRenderer;
import org.jfree.chart.renderer.BarRenderer;
import org.jfree.data.DefaultCategoryDataset;

/**
 * Tests for the {@link CategoryPlot} class.
 *
 * @author David Gilbert
 */
public class CategoryPlotTests extends TestCase {

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

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

    /**
     * Test the equals method.
     */
    public void testEquals() {
        CategoryPlot plot1 = new CategoryPlot();
        CategoryPlot plot2 = new CategoryPlot();
        assertTrue(plot1.equals(plot2));    
        
        // orientation...
        plot1.setOrientation(PlotOrientation.HORIZONTAL);
        assertFalse(plot1.equals(plot2));
        plot2.setOrientation(PlotOrientation.HORIZONTAL);
        assertTrue(plot1.equals(plot2));
        
        // axisOffset...
        plot1.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05));
        assertFalse(plot1.equals(plot2));
        plot2.setAxisOffset(new Spacer(Spacer.ABSOLUTE, 0.05, 0.05, 0.05, 0.05));
        assertTrue(plot1.equals(plot2));

        // domainAxis...
        plot1.setDomainAxis(new CategoryAxis("Category Axis"));
        assertFalse(plot1.equals(plot2));
        plot2.setDomainAxis(new CategoryAxis("Category Axis"));
        assertTrue(plot1.equals(plot2));

        // domainAxisLocation...
        plot1.setDomainAxisLocation(AxisLocation.TOP_OR_RIGHT);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainAxisLocation(AxisLocation.TOP_OR_RIGHT);
        assertTrue(plot1.equals(plot2));

        // secondaryDomainAxes...
        plot1.setSecondaryDomainAxis(11, new CategoryAxis("Secondary Axis"));
        assertFalse(plot1.equals(plot2));
        plot2.setSecondaryDomainAxis(11, new CategoryAxis("Secondary Axis"));
        assertTrue(plot1.equals(plot2));

        // secondaryDomainAxisLocations...
        plot1.setSecondaryDomainAxisLocation(11, AxisLocation.TOP_OR_RIGHT);
        assertFalse(plot1.equals(plot2));
        plot2.setSecondaryDomainAxisLocation(11, AxisLocation.TOP_OR_RIGHT);
        assertTrue(plot1.equals(plot2));

        // rangeAxis...
        plot1.setRangeAxis(new NumberAxis("Range Axis"));
        assertFalse(plot1.equals(plot2));
        plot2.setRangeAxis(new NumberAxis("Range Axis"));
        assertTrue(plot1.equals(plot2));

        // rangeAxisLocation...
        plot1.setRangeAxisLocation(AxisLocation.TOP_OR_RIGHT);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeAxisLocation(AxisLocation.TOP_OR_RIGHT);
        assertTrue(plot1.equals(plot2));

        // secondaryRangeAxes...
        plot1.setSecondaryRangeAxis(11, new NumberAxis("Secondary Range Axis"));
        assertFalse(plot1.equals(plot2));
        plot2.setSecondaryRangeAxis(11, new NumberAxis("Secondary Range Axis"));
        assertTrue(plot1.equals(plot2));

        // secondaryRangeAxisLocations...
        plot1.setSecondaryRangeAxisLocation(11, AxisLocation.TOP_OR_RIGHT);
        assertFalse(plot1.equals(plot2));
        plot2.setSecondaryRangeAxisLocation(11, AxisLocation.TOP_OR_RIGHT);
        assertTrue(plot1.equals(plot2));
        
        // secondaryDatasetDomainAxisMap...
        plot1.mapSecondaryDatasetToDomainAxis(11, new Integer(11));
        assertFalse(plot1.equals(plot2));
        plot2.mapSecondaryDatasetToDomainAxis(11, new Integer(11));
        assertTrue(plot1.equals(plot2));

        // secondaryDatasetRangeAxisMap...
        plot1.mapSecondaryDatasetToRangeAxis(11, new Integer(11));
        assertFalse(plot1.equals(plot2));
        plot2.mapSecondaryDatasetToRangeAxis(11, new Integer(11));
        assertTrue(plot1.equals(plot2));
        
        // renderer
        plot1.setRenderer(new AreaRenderer());
        assertFalse(plot1.equals(plot2));
        plot2.setRenderer(new AreaRenderer());
        assertTrue(plot1.equals(plot2));
        
        // secondary renderers
        plot1.setSecondaryRenderer(11, new AreaRenderer());
        assertFalse(plot1.equals(plot2));
        plot2.setSecondaryRenderer(11, new AreaRenderer());
        assertTrue(plot1.equals(plot2));
        
        // rendering order...
        plot1.setDatasetRenderingOrder(DatasetRenderingOrder.REVERSE);
        assertFalse(plot1.equals(plot2));
        plot2.setDatasetRenderingOrder(DatasetRenderingOrder.REVERSE);
        assertTrue(plot1.equals(plot2));

        // domainGridlinesVisible
        plot1.setDomainGridlinesVisible(true);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlinesVisible(true);
        assertTrue(plot1.equals(plot2));

        // domainGridlinePosition
        plot1.setDomainGridlinePosition(CategoryAnchor.END);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlinePosition(CategoryAnchor.END);
        assertTrue(plot1.equals(plot2));

        // domainGridlineStroke
        Stroke stroke = new BasicStroke(2.0f);
        plot1.setDomainGridlineStroke(stroke);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlineStroke(stroke);
        assertTrue(plot1.equals(plot2));
        
        // domainGridlinePaint
        plot1.setDomainGridlinePaint(Color.blue);
        assertFalse(plot1.equals(plot2));
        plot2.setDomainGridlinePaint(Color.blue);
        assertTrue(plot1.equals(plot2));
        
        // rangeGridlinesVisible
        plot1.setRangeGridlinesVisible(false);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeGridlinesVisible(false);
        assertTrue(plot1.equals(plot2));

        // rangeGridlineStroke
        plot1.setRangeGridlineStroke(stroke);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeGridlineStroke(stroke);
        assertTrue(plot1.equals(plot2));
        
        // rangeGridlinePaint
        plot1.setRangeGridlinePaint(Color.blue);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeGridlinePaint(Color.blue);
        assertTrue(plot1.equals(plot2));
        
        // anchorValue
        plot1.setAnchorValue(100.0);
        assertFalse(plot1.equals(plot2));
        plot2.setAnchorValue(100.0);
        assertTrue(plot1.equals(plot2));
        
        // rangeCrosshairVisible
        plot1.setRangeCrosshairVisible(true);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeCrosshairVisible(true);
        assertTrue(plot1.equals(plot2));
        
        // rangeCrosshairValue
        plot1.setRangeCrosshairValue(100.0);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeCrosshairValue(100.0);
        assertTrue(plot1.equals(plot2));
        
        // rangeCrosshairStroke
        plot1.setRangeCrosshairStroke(stroke);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeCrosshairStroke(stroke);
        assertTrue(plot1.equals(plot2));
        
        // rangeCrosshairPaint
        plot1.setRangeCrosshairPaint(Color.blue);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeCrosshairPaint(Color.blue);
        assertTrue(plot1.equals(plot2));
        
        // rangeCrosshairLockedOnData
        plot1.setRangeCrosshairLockedOnData(false);
        assertFalse(plot1.equals(plot2));
        plot2.setRangeCrosshairLockedOnData(false);
        assertTrue(plot1.equals(plot2));
        
        // range markers
        plot1.addRangeMarker(new Marker(4.0));
        assertFalse(plot1.equals(plot2));
        plot2.addRangeMarker(new Marker(4.0));
        assertTrue(plot1.equals(plot2));
        
        // secondary range markers
        plot1.addSecondaryRangeMarker(new Marker(4.0));
        assertFalse(plot1.equals(plot2));
        plot2.addSecondaryRangeMarker(new Marker(4.0));
        assertTrue(plot1.equals(plot2));
        
        // annotations
        plot1.addAnnotation(new CategoryTextAnnotation("Text", "Category", 43.0));
        assertFalse(plot1.equals(plot2));
        plot2.addAnnotation(new CategoryTextAnnotation("Text", "Category", 43.0));
        assertTrue(plot1.equals(plot2));
        
        // weight
        plot1.setWeight(3);
        assertFalse(plot1.equals(plot2));
        plot2.setWeight(3);
        assertTrue(plot1.equals(plot2));
        
    }

    /**
     * Confirm that cloning works.
     */
    public void testCloning() {
        CategoryPlot p1 = new CategoryPlot();
        CategoryPlot p2 = null;
        try {
            p2 = (CategoryPlot) p1.clone();
        }
        catch (CloneNotSupportedException e) {
            e.printStackTrace();
            System.err.println("CategoryPlotTests.testCloning: failed to clone.");
        }
        assertTrue(p1 != p2);
        assertTrue(p1.getClass() == p2.getClass());
        assertTrue(p1.equals(p2));
    }

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization() {

        DefaultCategoryDataset data = new DefaultCategoryDataset();
        CategoryAxis domainAxis = new CategoryAxis("Domain");
        NumberAxis rangeAxis = new NumberAxis("Range");
        BarRenderer renderer = new BarRenderer();
        CategoryPlot p1 = new CategoryPlot(data, domainAxis, rangeAxis, renderer);
        p1.setOrientation(PlotOrientation.HORIZONTAL);
        CategoryPlot 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 = (CategoryPlot) in.readObject();
            in.close();
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        boolean b = p1.equals(p2);
        assertEquals(p1, p2);

    }

    /**
     * Serialize an instance, restore it, and check for equality.
     */
    public void testSerialization2() {

        DefaultCategoryDataset data = new DefaultCategoryDataset();
        CategoryAxis domainAxis = new CategoryAxis("Domain");
        NumberAxis rangeAxis = new NumberAxis("Range");
        BarRenderer renderer = new BarRenderer();
        CategoryPlot p1 = new CategoryPlot(data, domainAxis, rangeAxis, renderer);
        p1.setOrientation(PlotOrientation.VERTICAL);
        CategoryPlot 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 = (CategoryPlot) in.readObject();
            in.close();
        }
        catch (Exception e) {
            System.out.println(e.toString());
        }
        assertEquals(p1, p2);

    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产伦精品一区二区三区视频青涩 | 成人国产精品免费观看| av在线不卡观看免费观看| 欧美日韩aaaaa| 中文字幕在线观看一区| 美女视频黄 久久| 欧美午夜不卡视频| 最新热久久免费视频| 久久国产精品露脸对白| 欧美羞羞免费网站| 中文字幕在线免费不卡| 国产精品一级在线| 日韩女优视频免费观看| 婷婷国产v国产偷v亚洲高清| 91免费观看视频在线| 国产欧美综合在线| 国产精品一区二区无线| 欧美电影免费观看高清完整版| 一区二区视频在线看| 粉嫩欧美一区二区三区高清影视| 日韩欧美一级二级| 日本午夜精品视频在线观看| 欧美日韩和欧美的一区二区| 亚洲免费资源在线播放| 91免费版在线看| 亚洲色图一区二区三区| 色综合天天天天做夜夜夜夜做| 中文字幕巨乱亚洲| 波多野结衣一区二区三区| 中文一区在线播放 | 午夜精品久久久久| 欧美午夜在线观看| 亚洲成人免费视频| 欧美顶级少妇做爰| 九九九久久久精品| 久久免费看少妇高潮| 国产一区二区三区免费看| 久久久久国产精品人| 国产成人av一区二区三区在线观看| 精品国产91洋老外米糕| 国产美女精品一区二区三区| 精品免费视频一区二区| 国产成人av在线影院| 日韩美女视频一区二区| 欧美视频在线观看一区| 青青国产91久久久久久| 久久综合久色欧美综合狠狠| 成人综合婷婷国产精品久久蜜臀 | 一区二区三区四区视频精品免费| 色噜噜夜夜夜综合网| 婷婷成人综合网| 久久蜜桃av一区二区天堂| 99久久综合精品| 亚洲第一在线综合网站| 日韩欧美色综合| 成人免费高清视频| 亚洲成人www| 久久综合丝袜日本网| 91婷婷韩国欧美一区二区| 午夜欧美一区二区三区在线播放| 欧美一区二区三区男人的天堂| 精品一区二区日韩| 成人欧美一区二区三区1314| 欧美日韩亚洲另类| 国v精品久久久网| 香蕉久久一区二区不卡无毒影院 | 欧美一级片免费看| 国产很黄免费观看久久| 亚洲综合色自拍一区| 精品国产乱码久久久久久夜甘婷婷| 国产精品资源在线| 亚洲成人在线网站| 国产精品污网站| 精品视频123区在线观看| 国产一区二区三区四区五区美女| 亚洲一区影音先锋| 国产精品久久久久久户外露出 | 欧美色手机在线观看| 日本不卡不码高清免费观看| 国产精品国产a| 精品三级在线看| 日本韩国一区二区| 成人毛片视频在线观看| 免费在线视频一区| 亚洲欧美日韩电影| 亚洲国产精品成人综合| 精品日韩av一区二区| 欧美色图第一页| 色婷婷精品久久二区二区蜜臂av| 国产乱一区二区| 免播放器亚洲一区| 亚洲成人av中文| 一区二区久久久| 中文字幕在线一区| 欧美极品少妇xxxxⅹ高跟鞋 | 国产一区二区调教| 青娱乐精品视频| 偷拍日韩校园综合在线| 亚洲一区二区三区美女| 亚洲狼人国产精品| 国产精品成人在线观看| 欧美经典一区二区| 国产欧美日韩亚州综合| 欧美精品一区二区在线观看| 日韩午夜激情视频| 日韩视频一区二区| 日韩色视频在线观看| 欧美日韩国产在线观看| 欧日韩精品视频| 欧美性一区二区| 欧美日韩久久久一区| 在线欧美日韩国产| 欧美日韩一区二区三区免费看| 在线区一区二视频| 欧美精品在线观看播放| 欧美三级欧美一级| 4438x亚洲最大成人网| 7777精品久久久大香线蕉| 欧美老年两性高潮| 日韩三级视频在线看| 日韩精品一区在线| 久久久久国产免费免费| 中文字幕国产一区| 综合色天天鬼久久鬼色| 亚洲综合视频在线观看| 天堂va蜜桃一区二区三区| 日本不卡一区二区三区 | 亚洲成人av资源| 日韩精品乱码免费| 国产麻豆日韩欧美久久| 成人性生交大片免费看中文网站| www.99精品| 欧美挠脚心视频网站| 日韩欧美第一区| 国产精品伦理在线| 午夜国产不卡在线观看视频| 麻豆视频一区二区| 成人天堂资源www在线| 在线亚洲一区二区| 精品噜噜噜噜久久久久久久久试看 | 欧美午夜不卡在线观看免费| 欧美日韩国产综合久久| www久久精品| 亚洲女女做受ⅹxx高潮| 蜜桃av噜噜一区| 99久久国产综合精品色伊| 欧美性色欧美a在线播放| 精品国产一区二区精华| 亚洲色图在线看| 美女网站色91| gogogo免费视频观看亚洲一| 欧美亚一区二区| 国产视频一区不卡| 午夜精品福利一区二区蜜股av | 青青草国产精品亚洲专区无| 韩国v欧美v日本v亚洲v| 日本高清不卡视频| 久久久久久免费网| 亚洲国产精品一区二区www在线| 极品美女销魂一区二区三区免费 | caoporn国产精品| 日韩三级免费观看| 亚洲欧美在线另类| 精品亚洲porn| 精品视频在线免费| 亚洲三级在线看| 精品一区二区影视| 欧美日本在线一区| 亚洲精品免费视频| 成人激情动漫在线观看| 欧美一卡二卡三卡四卡| 夜色激情一区二区| 91免费视频网址| 国产精品区一区二区三区| 青青草精品视频| 欧美色电影在线| 1000部国产精品成人观看| 国产乱妇无码大片在线观看| 欧美放荡的少妇| 亚洲福利视频导航| 色婷婷国产精品综合在线观看| 久久一夜天堂av一区二区三区| 日韩高清国产一区在线| 欧美三级中文字| 一区二区高清视频在线观看| 丰满白嫩尤物一区二区| 久久免费美女视频| 国内外精品视频| 欧美一卡在线观看| 日韩av不卡一区二区| 欧美高清视频一二三区| 午夜久久久久久久久久一区二区| 色婷婷国产精品综合在线观看| 亚洲图片另类小说| 91久久免费观看| 亚洲一区二区三区中文字幕 | 2023国产精品自拍| 国产自产高清不卡| 国产女同互慰高潮91漫画| 国产精品自产自拍|