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

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

?? meterneedle.java

?? 制作圖表的好工具
?? 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.]
 *
 * ----------------
 * MeterNeedle.java
 * ----------------
 * (C) Copyright 2002-2005, by the Australian Antarctic Division and 
 *                          Contributors.
 *
 * Original Author:  Bryan Scott (for the Australian Antarctic Division);
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *                   Nicolas Brodu (for Astrium and EADS Corporate Research 
 *                   Center);
 *
 * $Id: MeterNeedle.java,v 1.4.2.2 2005/10/25 20:50:49 mungady Exp $
 *
 * Changes:
 * --------
 * 25-Sep-2002 : Version 1, contributed by Bryan Scott (DG);
 * 07-Nov-2002 : Fixed errors reported by Checkstyle (DG);
 * 01-Sep-2003 : Implemented Serialization (NB);
 * 16-Mar-2004 : Changed transform from private to protected (BRS);
 * 08-Jun-2005 : Fixed equals() method to handle GradientPaint (DG);
 * 
 */

package org.jfree.chart.needle;

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

import org.jfree.io.SerialUtilities;
import org.jfree.util.ObjectUtilities;
import org.jfree.util.PaintUtilities;

/**
 * The base class used to represent the needle on a 
 * {@link org.jfree.chart.plot.CompassPlot}.
 *
 * @author Bryan Scott
 */
public abstract class MeterNeedle implements Serializable {

    /** For serialization. */
    private static final long serialVersionUID = 5203064851510951052L;
    
    /** The outline paint. */
    private transient Paint outlinePaint = Color.black;

    /** The outline stroke. */
    private transient Stroke outlineStroke = new BasicStroke(2);

    /** The fill paint. */
    private transient Paint fillPaint = null;

    /** The highlight paint. */
    private transient Paint highlightPaint = null;

    /** The size. */
    private int size = 5;

    /** Scalar to aply to locate the rotation x point. */
    private double rotateX = 0.5;

    /** Scalar to aply to locate the rotation y point. */
    private double rotateY = 0.5;

    /** A transform. */
    protected static AffineTransform transform = new AffineTransform();

    /**
     * Creates a new needle.
     */
    public MeterNeedle() {
        this(null, null, null);
    }

    /**
     * Creates a new needle.
     *
     * @param outline  the outline paint (<code>null</code> permitted).
     * @param fill  the fill paint (<code>null</code> permitted).
     * @param highlight  the highlight paint (<code>null</code> permitted).
     */
    public MeterNeedle(Paint outline, Paint fill, Paint highlight) {
        this.fillPaint = fill;
        this.highlightPaint = highlight;
        this.outlinePaint = outline;
    }

    /**
     * Returns the outline paint.
     *
     * @return The outline paint.
     */
    public Paint getOutlinePaint() {
        return this.outlinePaint;
    }

    /**
     * Sets the outline paint.
     *
     * @param p  the new paint.
     */
    public void setOutlinePaint(Paint p) {
        if (p != null) {
            this.outlinePaint = p;
        }
    }

    /**
     * Returns the outline stroke.
     *
     * @return The outline stroke.
     */
    public Stroke getOutlineStroke() {
        return this.outlineStroke;
    }

    /**
     * Sets the outline stroke.
     *
     * @param s  the new stroke.
     */
    public void setOutlineStroke(Stroke s) {
        if (s != null) {
            this.outlineStroke = s;
        }
    }

    /**
     * Returns the fill paint.
     *
     * @return The fill paint.
     */
    public Paint getFillPaint() {
        return this.fillPaint;
    }

    /**
     * Sets the fill paint.
     *
     * @param p  the fill paint.
     */
    public void setFillPaint(Paint p) {
        if (p != null) {
            this.fillPaint = p;
        }
    }

    /**
     * Returns the highlight paint.
     *
     * @return The highlight paint.
     */
    public Paint getHighlightPaint() {
        return this.highlightPaint;
    }

    /**
     * Sets the highlight paint.
     *
     * @param p  the highlight paint.
     */
    public void setHighlightPaint(Paint p) {
        if (p != null) {
            this.highlightPaint = p;
        }
    }

    /**
     * Returns the scalar used for determining the rotation x value.
     *
     * @return The x rotate scalar.
     */
    public double getRotateX() {
        return this.rotateX;
    }

    /**
     * Sets the rotateX value.
     *
     * @param x  the new value.
     */
    public void setRotateX(double x) {
        this.rotateX = x;
    }

    /**
     * Sets the rotateY value.
     *
     * @param y  the new value.
     */
    public void setRotateY(double y) {
        this.rotateY = y;
    }

    /**
     * Returns the scalar used for determining the rotation y value.
     *
     * @return The y rotate scalar.
     */
    public double getRotateY() {
        return this.rotateY;
    }

    /**
     * Draws the needle.
     *
     * @param g2  the graphics device.
     * @param plotArea  the plot area.
     */
    public void draw(Graphics2D g2, Rectangle2D plotArea) {
        draw(g2, plotArea, 0);
    }

    /**
     * Draws the needle.
     *
     * @param g2  the graphics device.
     * @param plotArea  the plot area.
     * @param angle  the angle.
     */
    public void draw(Graphics2D g2, Rectangle2D plotArea, double angle) {

        Point2D.Double pt = new Point2D.Double();
        pt.setLocation(
            plotArea.getMinX() + this.rotateX * plotArea.getWidth(),
            plotArea.getMinY() + this.rotateY * plotArea.getHeight()
        );
        draw(g2, plotArea, pt, angle);

    }

    /**
     * Draws the needle.
     *
     * @param g2  the graphics device.
     * @param plotArea  the plot area.
     * @param rotate  the rotation point.
     * @param angle  the angle.
     */
    public void draw(Graphics2D g2, Rectangle2D plotArea, Point2D rotate, 
                     double angle) {

        Paint savePaint = g2.getColor();
        Stroke saveStroke = g2.getStroke();

        drawNeedle(g2, plotArea, rotate, Math.toRadians(angle));

        g2.setStroke(saveStroke);
        g2.setPaint(savePaint);

    }

    /**
     * Draws the needle.
     *
     * @param g2  the graphics device.
     * @param plotArea  the plot area.
     * @param rotate  the rotation point.
     * @param angle  the angle.
     */
    protected abstract void drawNeedle(Graphics2D g2,
                                       Rectangle2D plotArea, Point2D rotate, 
                                       double angle);

    /**
     * Displays a shape.
     *
     * @param g2  the graphics device.
     * @param shape  the shape.
     */
    protected void defaultDisplay(Graphics2D g2, Shape shape) {

        if (this.fillPaint != null) {
            g2.setPaint(this.fillPaint);
            g2.fill(shape);
        }

        if (this.outlinePaint != null) {
            g2.setStroke(this.outlineStroke);
            g2.setPaint(this.outlinePaint);
            g2.draw(shape);
        }

    }

    /**
     * Returns the size.
     *
     * @return The size.
     */
    public int getSize() {
        return this.size;
    }

    /**
     * Sets the size.
     *
     * @param pixels  the new size.
     */
    public void setSize(int pixels) {
        this.size = pixels;
    }

    /**
     * Returns the transform.
     *
     * @return The transform.
     */
    public AffineTransform getTransform() {
        return MeterNeedle.transform;
    }

    /**
     * Tests another object for equality with this object.
     *
     * @param obj the object to test (<code>null</code> permitted).
     *
     * @return A boolean.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof MeterNeedle)) {
            return false;
        }
        MeterNeedle that = (MeterNeedle) obj;
        if (!PaintUtilities.equal(this.outlinePaint, that.outlinePaint)) {
            return false;
        }
        if (!ObjectUtilities.equal(this.outlineStroke, that.outlineStroke)) {
            return false;
        }
        if (!PaintUtilities.equal(this.fillPaint, that.fillPaint)) {
            return false;
        }
        if (!PaintUtilities.equal(this.highlightPaint, that.highlightPaint)) {
            return false;
        }
        if (this.size != that.size) {
            return false;
        }
        if (this.rotateX != that.rotateX) {
            return false;
        }
        if (this.rotateY != that.rotateY) {
            return false;
        }
        return true;
    }

    /**
     * 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.writeStroke(this.outlineStroke, stream);
        SerialUtilities.writePaint(this.outlinePaint, stream);
        SerialUtilities.writePaint(this.fillPaint, stream);
        SerialUtilities.writePaint(this.highlightPaint, 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.outlineStroke = SerialUtilities.readStroke(stream);
        this.outlinePaint = SerialUtilities.readPaint(stream);
        this.fillPaint = SerialUtilities.readPaint(stream);
        this.highlightPaint = SerialUtilities.readPaint(stream);
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天综合天天做天天综合| 亚洲乱码一区二区三区在线观看| 成人手机电影网| 亚洲成在线观看| 国产精品私房写真福利视频| 6080yy午夜一二三区久久| 成人av网址在线| 六月丁香综合在线视频| 亚洲免费在线视频一区 二区| 欧美mv日韩mv国产网站| 欧美制服丝袜第一页| 国产suv精品一区二区三区| 五月婷婷久久综合| **性色生活片久久毛片| 久久精品视频一区二区三区| 欧美剧情电影在线观看完整版免费励志电影 | 亚洲免费成人av| 精品福利av导航| 欧美日韩色综合| 色欧美乱欧美15图片| 国产精品1区2区| 久久精品72免费观看| 亚洲一区二区中文在线| 亚洲视频在线观看三级| 久久久国产精华| 日韩一区二区三区免费观看| 欧美丝袜自拍制服另类| 日本高清无吗v一区| 99亚偷拍自图区亚洲| 国产不卡免费视频| 国产福利一区在线| 狠狠色狠狠色综合| 精品一区二区免费在线观看| 热久久免费视频| 午夜欧美大尺度福利影院在线看| 亚洲免费在线电影| 国产精品免费网站在线观看| 久久精品视频网| 久久嫩草精品久久久久| 精品国产91亚洲一区二区三区婷婷 | 国产精品对白交换视频| 国产农村妇女毛片精品久久麻豆| 久久亚洲私人国产精品va媚药| 日韩无一区二区| 日韩精品一区二区三区swag| 自拍av一区二区三区| 中文字幕第一区综合| 久久久www成人免费无遮挡大片| 精品国产乱子伦一区| 久久久久久日产精品| 国产三级久久久| 国产精品久久久久三级| 中文字幕一区二区三区四区| 亚洲欧美日韩一区二区| 一区二区三区欧美| 偷窥国产亚洲免费视频| 秋霞电影网一区二区| 精品一区二区三区日韩| 国产精品一区不卡| 成人avav在线| 欧美性受xxxx| 在线成人免费观看| 精品美女在线播放| 国产精品网站在线观看| 亚洲色图欧洲色图婷婷| 午夜久久久久久久久久一区二区| 日本欧美一区二区| 国产一区二区在线观看免费| 波多野结衣在线一区| 91官网在线免费观看| 欧美肥大bbwbbw高潮| 久久久久久久久97黄色工厂| 欧美激情一区三区| av一区二区不卡| 欧美日韩国产三级| 丰满亚洲少妇av| 91极品视觉盛宴| 7777精品伊人久久久大香线蕉经典版下载 | 一区二区在线观看免费视频播放| 亚洲国产精品一区二区尤物区| 男男视频亚洲欧美| 国产一区二区三区| 色一区在线观看| 日韩欧美国产一区二区三区 | 国产成人精品午夜视频免费| 日本韩国欧美一区| 久久综合久久综合九色| 亚洲欧美乱综合| 久久国产精品区| 91麻豆精品一区二区三区| 67194成人在线观看| 国产精品免费人成网站| 亚洲国产美国国产综合一区二区| 国产真实乱子伦精品视频| 91美女视频网站| 欧美精品一区二区三区很污很色的| 国产精品国产三级国产三级人妇| 污片在线观看一区二区| 成人综合在线观看| 欧美一区二区三区四区五区| 国产精品久久久久久亚洲伦| 蜜桃一区二区三区在线观看| 97久久精品人人做人人爽 | 夜夜亚洲天天久久| 国产精品77777竹菊影视小说| 欧美精品在线视频| 成人欧美一区二区三区在线播放| 国内精品第一页| 欧美乱熟臀69xxxxxx| 综合色中文字幕| 国产麻豆一精品一av一免费| 欧美久久久久免费| 亚洲精品va在线观看| 成人精品一区二区三区四区| 精品久久久久久久久久久久久久久| 亚洲激情中文1区| 波多野结衣中文字幕一区二区三区 | 成年人午夜久久久| 国产清纯白嫩初高生在线观看91 | 国产麻豆精品一区二区| 69堂国产成人免费视频| 一区二区三区高清不卡| 成人黄动漫网站免费app| 久久免费看少妇高潮| 久久精品国产精品亚洲综合| 欧美日韩国产电影| 亚洲国产成人av网| 欧洲一区二区三区免费视频| 亚洲欧美激情在线| 99re66热这里只有精品3直播 | 国产精品免费看片| 国产成人免费av在线| 精品理论电影在线观看| 久久成人免费网站| 欧美大肚乱孕交hd孕妇| 日韩有码一区二区三区| 欧美日韩高清一区| 亚洲成人激情社区| 欧美日韩激情一区二区| 亚洲成人av在线电影| 欧美日韩国产一级二级| 亚洲444eee在线观看| 欧美日韩在线直播| 亚洲第一成人在线| 欧美一级高清大全免费观看| 日本不卡1234视频| 欧美大胆人体bbbb| 国产一区二区福利视频| 国产精品污网站| 色哟哟一区二区| 亚洲制服丝袜av| 欧美高清视频一二三区| 麻豆极品一区二区三区| 久久久综合激的五月天| 成人禁用看黄a在线| 日韩毛片视频在线看| 欧美亚洲日本国产| 美女一区二区久久| 国产偷国产偷亚洲高清人白洁| 不卡的av在线播放| 亚洲国产欧美在线| 精品国产1区二区| 成人毛片在线观看| 一区二区三区成人| 日韩一区二区免费电影| 国产高清不卡一区| 一级精品视频在线观看宜春院| 日韩亚洲欧美一区二区三区| 国产91清纯白嫩初高中在线观看 | 午夜精品久久久| 久久综合狠狠综合久久激情| 不卡大黄网站免费看| 午夜电影网亚洲视频| 久久婷婷色综合| 色综合久久88色综合天天6 | 日韩av成人高清| 日本一区二区三级电影在线观看 | 麻豆91免费观看| 国产精品乱子久久久久| 欧美群妇大交群的观看方式| 国产福利精品导航| 夜夜嗨av一区二区三区四季av| 欧美成人在线直播| 色综合久久中文字幕综合网| 奇米在线7777在线精品| 国产精品麻豆视频| 欧美一级在线观看| 91在线视频18| 久久不见久久见免费视频1| 亚洲免费av高清| www精品美女久久久tv| 欧美在线影院一区二区| 夫妻av一区二区| 日韩福利视频网| 亚洲视频免费在线| 久久久精品免费观看| 欧美疯狂性受xxxxx喷水图片| 成人中文字幕合集| 另类小说视频一区二区| 一区二区三区.www|