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

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

?? categorylineannotation.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.]
 *
 * ---------------------------
 * CategoryLineAnnotation.java
 * ---------------------------
 * (C) Copyright 2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: CategoryLineAnnotation.java,v 1.1.2.2 2005/10/25 16:51:15 mungady Exp $
 *
 * Changes:
 * --------
 * 29-Jul-2005 : Version 1, based on CategoryTextAnnotation (DG);
 *
 */

package org.jfree.chart.annotations;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.io.Serializable;

import org.jfree.chart.axis.CategoryAnchor;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.CategoryDataset;
import org.jfree.io.SerialUtilities;
import org.jfree.ui.RectangleEdge;
import org.jfree.util.ObjectUtilities;
import org.jfree.util.PaintUtilities;

/**
 * A line annotation that can be placed on a 
 * {@link org.jfree.chart.plot.CategoryPlot}.
 */
public class CategoryLineAnnotation implements CategoryAnnotation, 
                                               Cloneable, Serializable {
    
    /** The category for the start of the line. */
    private Comparable category1;

    /** The value for the start of the line. */
    private double value1;

    /** The category for the end of the line. */
    private Comparable category2;
    
    /** The value for the end of the line. */
    private double value2;
    
    /** The line color. */
    private transient Paint paint = Color.black;
    
    /** The line stroke. */
    private transient Stroke stroke = new BasicStroke(1.0f);
     
    /**
     * Creates a new annotation that draws a line between (category1, value1)
     * and (category2, value2).
     *
     * @param category1  the category (<code>null</code> not permitted).
     * @param value1  the value.
     * @param category2  the category (<code>null</code> not permitted).
     * @param value2  the value.
     */
    public CategoryLineAnnotation(Comparable category1, double value1, 
                                  Comparable category2, double value2,
                                  Paint paint, Stroke stroke) {
        if (category1 == null) {
            throw new IllegalArgumentException("Null 'category1' argument.");   
        }
        if (category2 == null) {
            throw new IllegalArgumentException("Null 'category2' argument.");   
        }
        if (paint == null) {
            throw new IllegalArgumentException("Null 'paint' argument.");   
        }
        if (stroke == null) {
            throw new IllegalArgumentException("Null 'stroke' argument.");   
        }
        this.category1 = category1;
        this.value1 = value1;
        this.category2 = category2;
        this.value2 = value2;
        this.paint = paint;
        this.stroke = stroke;
    }

    /**
     * Returns the category for the start of the line.
     * 
     * @return The category for the start of the line (never <code>null</code>).
     */
    public Comparable getCategory1() {
        return this.category1;
    }
    
    /**
     * Sets the category for the start of the line.
     * 
     * @param category  the category (<code>null</code> not permitted).
     */
    public void setCategory1(Comparable category) {
        if (category == null) {
            throw new IllegalArgumentException("Null 'category' argument.");   
        }
        this.category1 = category;
    }
    
    /**
     * Returns the y-value for the start of the line.
     * 
     * @return The y-value for the start of the line.
     */
    public double getValue1() {
        return this.value1;
    }
    
    /**
     * Sets the y-value for the start of the line.
     * 
     * @param value  the value.
     */
    public void setValue1(double value) {
        this.value1 = value;    
    }
    
    /**
     * Returns the category for the end of the line.
     * 
     * @return The category for the end of the line (never <code>null</code>).
     */
    public Comparable getCategory2() {
        return this.category2;
    }
    
    /**
     * Sets the category for the end of the line.
     * 
     * @param category  the category (<code>null</code> not permitted).
     */
    public void setCategory2(Comparable category) {
        if (category == null) {
            throw new IllegalArgumentException("Null 'category' argument.");   
        }
        this.category2 = category;
    }
    
    /**
     * Returns the y-value for the end of the line.
     * 
     * @return The y-value for the end of the line.
     */
    public double getValue2() {
        return this.value2;
    }
    
    /**
     * Sets the y-value for the end of the line.
     * 
     * @param value  the value.
     */
    public void setValue2(double value) {
        this.value2 = value;    
    }
    
    /**
     * Returns the paint used to draw the connecting line.
     * 
     * @return The paint (never <code>null</code>).
     */
    public Paint getPaint() {
        return this.paint;
    }
    
    /**
     * Sets the paint used to draw the connecting line.
     * 
     * @param paint  the paint (<code>null</code> not permitted).
     */
    public void setPaint(Paint paint) {
        if (paint == null) {
            throw new IllegalArgumentException("Null 'paint' argument.");
        }
        this.paint = paint;
    }
    
    /**
     * Returns the stroke used to draw the connecting line.
     * 
     * @return The stroke (never <code>null</code>).
     */
    public Stroke getStroke() {
        return this.stroke;
    }
    
    /**
     * Sets the stroke used to draw the connecting line.
     * 
     * @param stroke  the stroke (<code>null</code> not permitted).
     */
    public void setStroke(Stroke stroke) {
        if (stroke == null) {
            throw new IllegalArgumentException("Null 'stroke' argument.");
        }
        this.stroke = stroke;
    }
    
    /**
     * Draws the annotation.
     *
     * @param g2  the graphics device.
     * @param plot  the plot.
     * @param dataArea  the data area.
     * @param domainAxis  the domain axis.
     * @param rangeAxis  the range axis.
     */
    public void draw(Graphics2D g2, CategoryPlot plot, Rectangle2D dataArea,
                     CategoryAxis domainAxis, ValueAxis rangeAxis) {

        CategoryDataset dataset = plot.getDataset();
        int catIndex1 = dataset.getColumnIndex(this.category1);
        int catIndex2 = dataset.getColumnIndex(this.category2);
        int catCount = dataset.getColumnCount();

        double lineX1 = 0.0f;
        double lineY1 = 0.0f;
        double lineX2 = 0.0f;
        double lineY2 = 0.0f;
        PlotOrientation orientation = plot.getOrientation();
        RectangleEdge domainEdge = Plot.resolveDomainAxisLocation(
            plot.getDomainAxisLocation(), orientation);
        RectangleEdge rangeEdge = Plot.resolveRangeAxisLocation(
            plot.getRangeAxisLocation(), orientation);
        
        if (orientation == PlotOrientation.HORIZONTAL) {
            lineY1 = domainAxis.getCategoryJava2DCoordinate(
                CategoryAnchor.MIDDLE, catIndex1, catCount, dataArea, 
                domainEdge);
            lineX1 = rangeAxis.valueToJava2D(this.value1, dataArea, rangeEdge);
            lineY2 = domainAxis.getCategoryJava2DCoordinate(
                CategoryAnchor.MIDDLE, catIndex2, catCount, dataArea, 
                domainEdge);
            lineX2 = rangeAxis.valueToJava2D(this.value2, dataArea, rangeEdge);
        }
        else if (orientation == PlotOrientation.VERTICAL) {
            lineX1 = domainAxis.getCategoryJava2DCoordinate(
                CategoryAnchor.MIDDLE, catIndex1, catCount, dataArea, 
                domainEdge);
            lineY1 = rangeAxis.valueToJava2D(this.value1, dataArea, rangeEdge);
            lineX2 = domainAxis.getCategoryJava2DCoordinate(
                CategoryAnchor.MIDDLE, catIndex2, catCount, dataArea, 
                domainEdge);
            lineY2 = rangeAxis.valueToJava2D(this.value2, dataArea, rangeEdge);
        }
        g2.setPaint(this.paint);
        g2.setStroke(this.stroke);
        g2.drawLine((int) lineX1, (int) lineY1, (int) lineX2, (int) lineY2);
    }

    /**
     * Tests this object for equality with another.
     * 
     * @param obj  the object (<code>null</code> permitted).
     * 
     * @return <code>true</code> or <code>false</code>.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof CategoryLineAnnotation)) {
            return false;
        }
        CategoryLineAnnotation that = (CategoryLineAnnotation) obj;
        if (!this.category1.equals(that.getCategory1())) {
            return false;
        }
        if (this.value1 != that.getValue1()) {
            return false;    
        }
        if (!this.category2.equals(that.getCategory2())) {
            return false;
        }
        if (this.value2 != that.getValue2()) {
            return false;    
        }
        if (!PaintUtilities.equal(this.paint, that.paint)) {
            return false;
        }
        if (!ObjectUtilities.equal(this.stroke, that.stroke)) {
            return false;
        }
        return true;
    }
    
    /**
     * Returns a hash code for this instance.
     * 
     * @return A hash code.
     */
    public int hashCode() {
        // TODO: this needs work
        return this.category1.hashCode() + this.category2.hashCode(); 
    }
    
    /**
     * Returns a clone of the annotation.
     * 
     * @return A clone.
     * 
     * @throws CloneNotSupportedException  this class will not throw this 
     *         exception, but subclasses (if any) might.
     */
    public Object clone() throws CloneNotSupportedException {
        return super.clone();    
    }
  
    /**
     * Provides serialization support.
     *
     * @param stream  the output stream.
     *
     * @throws IOException if there is an I/O error.
     */
    private void writeObject(ObjectOutputStream stream) throws IOException {
        stream.defaultWriteObject();
        SerialUtilities.writePaint(this.paint, stream);
        SerialUtilities.writeStroke(this.stroke, stream);
    }

    /**
     * Provides serialization support.
     *
     * @param stream  the input stream.
     *
     * @throws IOException  if there is an I/O error.
     * @throws ClassNotFoundException  if there is a classpath problem.
     */
    private void readObject(ObjectInputStream stream) 
        throws IOException, ClassNotFoundException {
        stream.defaultReadObject();
        this.paint = SerialUtilities.readPaint(stream);
        this.stroke = SerialUtilities.readStroke(stream);
    }

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天色综合成人网| 成人美女在线视频| 欧美一a一片一级一片| 伊人色综合久久天天人手人婷| 国产成人h网站| 国产欧美一区二区在线| 国产99精品视频| 亚洲视频一区在线观看| 欧美日韩一区二区三区四区| 人人精品人人爱| 精品理论电影在线观看| 成人丝袜视频网| 亚洲欧洲三级电影| 69堂亚洲精品首页| 成人一级视频在线观看| 一区二区三区在线观看网站| 91麻豆精品国产综合久久久久久| 全国精品久久少妇| 中文av一区特黄| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 精品日韩成人av| 成人综合婷婷国产精品久久免费| 亚洲欧美综合色| 色综合久久综合| 美女一区二区视频| 久久亚洲综合av| 成人av影院在线| 亚洲国产裸拍裸体视频在线观看乱了| 欧美无乱码久久久免费午夜一区| 日日摸夜夜添夜夜添国产精品 | 1024成人网| 欧美理论片在线| 高清国产一区二区| 亚洲成av人在线观看| 久久精品视频一区| 日本道精品一区二区三区| 日本午夜一本久久久综合| 国产欧美一区二区精品性色超碰| 99re热视频这里只精品| 日韩激情中文字幕| 亚洲天堂成人网| 久久综合色婷婷| 欧美高清视频不卡网| 91视频xxxx| 黄色日韩三级电影| 香蕉影视欧美成人| 亚洲视频在线一区观看| 国产亚洲一区字幕| 欧美一区二区三区爱爱| 一本高清dvd不卡在线观看 | 亚洲成人自拍偷拍| 国产精品美女久久久久久久久久久 | 粉嫩嫩av羞羞动漫久久久| 天堂在线亚洲视频| 亚洲综合免费观看高清在线观看| 久久久精品国产免费观看同学| 欧美日韩一卡二卡三卡| 91香蕉视频污在线| 不卡视频在线看| 国产电影精品久久禁18| 久久91精品国产91久久小草| 午夜视频一区在线观看| 一区二区三区91| 一区二区三区在线免费视频 | 亚洲综合自拍偷拍| 亚洲欧洲国产专区| 中文字幕中文字幕中文字幕亚洲无线 | 韩国av一区二区三区| 日本中文字幕一区| 免费在线观看日韩欧美| 三级久久三级久久久| 午夜精品福利一区二区三区av| 一区二区三区美女| 亚洲成人第一页| 亚洲h在线观看| 奇米888四色在线精品| 蜜桃av一区二区| 看电视剧不卡顿的网站| 久久精品国产久精国产爱| 久久精品久久综合| 精品亚洲成av人在线观看| 精久久久久久久久久久| 蜜臀av性久久久久蜜臀aⅴ流畅 | 亚洲精品一线二线三线| 精品日韩一区二区三区| 欧美精品一区二区三区蜜桃视频| 337p日本欧洲亚洲大胆精品| 久久一留热品黄| 中文字幕中文乱码欧美一区二区| 国产精品午夜久久| 亚洲综合在线观看视频| 午夜精彩视频在线观看不卡| 亚洲综合精品自拍| 日韩va欧美va亚洲va久久| 精油按摩中文字幕久久| 福利视频网站一区二区三区| 91麻豆成人久久精品二区三区| 91黄色小视频| 欧美变态tickle挠乳网站| 中文在线免费一区三区高中清不卡| 国产精品嫩草影院av蜜臀| 一区2区3区在线看| 青青青伊人色综合久久| 国产精品1024久久| 在线视频欧美精品| 精品欧美乱码久久久久久| 亚洲国产精品传媒在线观看| 亚洲激情第一区| 精品一区二区三区在线观看国产| 国产高清一区日本| 欧美日韩亚洲不卡| 久久色视频免费观看| 亚洲美女淫视频| 久久精品国产久精国产爱| av一区二区三区黑人| 欧美日韩成人综合| 国产精品视频第一区| 日韩高清不卡一区| 波多野结衣一区二区三区 | 精品国产a毛片| 综合婷婷亚洲小说| 激情综合网天天干| 欧美在线免费观看亚洲| 久久精品综合网| 婷婷国产在线综合| 不卡一卡二卡三乱码免费网站| 在线不卡一区二区| 日韩美女久久久| 国产精品白丝av| 欧美福利一区二区| 亚洲免费在线视频| 国产99久久久精品| 欧美一区二区在线播放| 亚洲免费在线电影| 丁香婷婷综合五月| 欧美mv日韩mv国产| 一区二区三区免费网站| 国产69精品一区二区亚洲孕妇| 91麻豆精品国产自产在线观看一区 | 亚洲电影激情视频网站| 成人av在线一区二区| 日韩欧美久久久| 亚洲成人av一区二区| 一本一本大道香蕉久在线精品 | 日韩高清电影一区| 一本高清dvd不卡在线观看 | 亚洲精品国久久99热| 国产91清纯白嫩初高中在线观看| 91精品国产入口在线| 亚洲va欧美va人人爽| 色综合天天综合狠狠| 国产精品天干天干在线综合| 国产精品一区二区免费不卡| 日韩三级在线观看| 五月天亚洲婷婷| 欧美日本国产视频| 亚洲线精品一区二区三区 | 欧美日韩大陆一区二区| 夜夜亚洲天天久久| 97se亚洲国产综合自在线不卡| 日本一区二区免费在线观看视频| 久久99久久99| 欧美精品一区二区三区很污很色的| 琪琪久久久久日韩精品| 538prom精品视频线放| 日韩精品亚洲一区二区三区免费| 欧美日韩亚洲高清一区二区| 亚洲成人精品在线观看| 欧美精品v日韩精品v韩国精品v| 亚洲在线中文字幕| 欧美日韩激情在线| 日韩高清不卡一区二区| 欧美久久久久久蜜桃| 日产欧产美韩系列久久99| 这里只有精品电影| 极品少妇xxxx精品少妇偷拍| wwww国产精品欧美| 成人福利视频网站| 亚洲精品中文在线| 欧美猛男男办公室激情| 蜜桃91丨九色丨蝌蚪91桃色| 精品久久久久久久人人人人传媒 | 99国产精品视频免费观看| 亚洲欧美综合色| 欧美在线不卡一区| 免费观看日韩电影| 国产日韩精品一区二区三区 | 欧美丝袜丝交足nylons| 日韩电影在线一区| 国产丝袜美腿一区二区三区| 91蜜桃传媒精品久久久一区二区| 一区二区三区中文字幕精品精品| 欧美日本一区二区三区| 丝袜亚洲精品中文字幕一区| www国产精品av| 99久久精品免费看国产免费软件| 一区二区在线电影| 日韩精品一区二区三区四区| 懂色av噜噜一区二区三区av| 亚洲国产一区二区a毛片|