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

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

?? meterneedle.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.
 *
 * ----------------
 * MeterNeedle.java
 * ----------------
 * (C) Copyright 2002, 2003, 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.5 2003/09/11 08:10:13 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);
 *
 */

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.ObjectUtils;

/**
 * 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 {

    /** 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. */
    private static AffineTransform transform = new AffineTransform();

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

    /**
     * Creates a new needle.
     *
     * @param outline  the outline paint.
     * @param fill  the fill paint.
     * @param highlight  the highlight paint.
     */
    public MeterNeedle(Paint outline, Paint fill, Paint highlight) {
        fillPaint = fill;
        highlightPaint = highlight;
        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) {
            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) {
            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) {
            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) {
            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() + rotateX * plotArea.getWidth(),
                       plotArea.getMinY() + 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 (fillPaint != null) {
            g2.setPaint(fillPaint);
            g2.fill(shape);
        }

        if (outlinePaint != null) {
            g2.setStroke(outlineStroke);
            g2.setPaint(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) {
        size = pixels;
    }

    /**
     * Returns the transform.
     *
     * @return the transform.
     */
    public AffineTransform getTransform() {
        return MeterNeedle.transform;
    }
    
    /**
     * Tests another object for equality with this object.
     * 
     * @param object  the object to test.
     * 
     * @return A boolean.
     */
    public boolean equals(Object object) {
        if (object == null) {
            return false;
        }
        if (object == this) {
            return true;
        }
        if (object instanceof MeterNeedle) {
            
            MeterNeedle n = (MeterNeedle) object;
            boolean b0 = ObjectUtils.equal(this.outlinePaint, n.outlinePaint);
            boolean b1 = ObjectUtils.equal(this.outlineStroke, n.outlineStroke);
            boolean b2 = ObjectUtils.equal(this.fillPaint, n.fillPaint);
            boolean b3 = ObjectUtils.equal(this.highlightPaint, n.highlightPaint);
            boolean b4 = (this.size == n.size);
            boolean b5 = (this.rotateX == n.rotateX);
            boolean b6 = (this.rotateY == n.rotateY);            
            return b0 && b1 && b2 && b3 && b4 && b5 && b6;
        }
        return false;
    }
    
    /**
     * 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一区二区三区免费野_久草精品视频
天天综合网天天综合色| 免费在线观看一区二区三区| 亚洲h动漫在线| 国产一区二区不卡| 欧美亚洲日本一区| 日韩毛片视频在线看| 久久精品久久综合| 欧美日韩午夜在线| 国产精品女主播在线观看| 美女视频黄久久| 欧美日韩综合不卡| 亚洲人成7777| 国产mv日韩mv欧美| 久久免费看少妇高潮| 美腿丝袜亚洲综合| 3atv一区二区三区| 亚洲大片一区二区三区| 色网站国产精品| 成人欧美一区二区三区在线播放| 九九视频精品免费| 欧美mv和日韩mv国产网站| 婷婷久久综合九色综合绿巨人| av成人动漫在线观看| 中文字幕一区二区三区精华液| 国产一区二区三区观看| 日韩欧美在线综合网| 日韩激情视频网站| 538在线一区二区精品国产| 亚洲一区二区在线观看视频| 色婷婷久久综合| 亚洲精品中文在线| 色婷婷综合中文久久一本| 亚洲私人黄色宅男| 91国在线观看| 一区二区三区四区激情| 一本一道久久a久久精品 | 日韩欧美国产一区二区在线播放 | 久久精品亚洲国产奇米99| 蜜臀av一区二区在线观看| 欧美视频一区二区| 日韩激情一二三区| 日韩精品一区二区三区在线| 麻豆国产精品官网| 国产喂奶挤奶一区二区三区| 国产剧情一区二区| 国产精品美女久久久久aⅴ| 成人av网站在线观看| 亚洲视频资源在线| 欧美日韩国产综合久久| 日韩av中文在线观看| 欧美成人r级一区二区三区| 国产精品一区二区在线观看网站| 国产人成一区二区三区影院| 成人黄色一级视频| 亚洲综合色网站| 日韩精品一区二| 国产91露脸合集magnet| 亚洲免费观看在线视频| 欧美男男青年gay1069videost| 偷偷要91色婷婷| 26uuu精品一区二区在线观看| 国产成人精品免费在线| 亚洲精品成人在线| 欧美一级电影网站| 国产99久久久精品| 亚洲午夜激情网页| 国产亚洲福利社区一区| 日本久久精品电影| 国产在线精品免费av| 亚洲三级电影网站| 精品国产乱码久久久久久影片| 不卡视频在线看| 日韩vs国产vs欧美| 亚洲欧美国产高清| 久久九九国产精品| 6080国产精品一区二区| 99亚偷拍自图区亚洲| 久久国产精品无码网站| 椎名由奈av一区二区三区| 精品久久人人做人人爱| 在线观看一区不卡| 成人综合日日夜夜| 久久精品av麻豆的观看方式| 亚洲女性喷水在线观看一区| 26uuu欧美| 91精品国产欧美一区二区18| 成人免费看视频| 免费美女久久99| 一区二区三区免费在线观看| 久久亚洲欧美国产精品乐播| 欧美高清精品3d| 91亚洲精品久久久蜜桃网站| 国产美女主播视频一区| 婷婷久久综合九色综合绿巨人| 国产精品福利av| 国产欧美一区二区精品性| 欧美一级免费大片| 欧美日韩一级片在线观看| 波多野结衣精品在线| 国产精品亚洲а∨天堂免在线| 日本视频在线一区| 亚洲国产精品久久久久婷婷884| 国产精品天干天干在观线 | 欧美又粗又大又爽| 91在线无精精品入口| 国产suv精品一区二区三区| 美腿丝袜亚洲三区| 免费一级欧美片在线观看| 亚洲午夜激情av| 亚洲电影在线播放| 亚洲成人www| 亚洲大型综合色站| 亚洲成人在线网站| 亚洲国产日韩a在线播放| 亚洲天堂中文字幕| 日韩一区欧美一区| 亚洲免费视频中文字幕| 夜夜爽夜夜爽精品视频| 一区二区视频在线| 亚洲综合另类小说| 亚洲成人免费影院| 日本亚洲电影天堂| 国内精品写真在线观看| 黄页视频在线91| 粉嫩在线一区二区三区视频| 风间由美一区二区三区在线观看| 国产福利一区在线| 99视频超级精品| 欧美色图片你懂的| 69堂精品视频| 久久人人爽爽爽人久久久| 久久久www成人免费毛片麻豆| 久久这里只有精品首页| 国产欧美一区二区精品婷婷 | 国产精品女上位| 亚洲一区二区三区精品在线| 一区二区三区鲁丝不卡| 亚洲777理论| 国产美女在线观看一区| 大桥未久av一区二区三区中文| 成人av免费在线播放| 欧美综合一区二区| 精品欧美黑人一区二区三区| 国产日产欧产精品推荐色| 亚洲美女在线国产| 日本中文字幕一区二区有限公司| 国产在线精品一区在线观看麻豆| 不卡一卡二卡三乱码免费网站| 在线观看免费成人| 精品日韩欧美在线| 亚洲精品日韩专区silk| 青青草国产精品97视觉盛宴| 成人免费视频视频在线观看免费| 91日韩在线专区| 日韩欧美资源站| 一区二区三区在线免费播放| 日本va欧美va瓶| 成人av免费在线| 欧美乱妇一区二区三区不卡视频| 宅男在线国产精品| 日韩一区二区免费在线观看| 欧美一区二区三区精品| 日本一区二区久久| 久久国产免费看| 日韩精品电影一区亚洲| 午夜不卡av在线| 久久99精品国产| www.性欧美| 欧美日韩精品欧美日韩精品| 黄网站免费久久| 一区二区三区四区在线免费观看| 六月丁香综合在线视频| 欧美va在线播放| 成人免费看的视频| 免费在线视频一区| 国产成人综合亚洲网站| 日韩 欧美一区二区三区| 亚洲综合偷拍欧美一区色| 欧美日韩日日摸| 偷拍一区二区三区四区| 在线综合亚洲欧美在线视频| 精品一区二区久久| 中文字幕精品三区| 91黄色激情网站| 久久精品免费观看| 中文文精品字幕一区二区| www.99精品| 1区2区3区国产精品| 91麻豆成人久久精品二区三区| 1区2区3区国产精品| 日本高清不卡视频| 成人av免费网站| 懂色av中文字幕一区二区三区| 午夜精品福利一区二区三区蜜桃| 成人免费在线视频观看| 欧美一二三在线| 成人美女视频在线观看18| 久久不见久久见中文字幕免费| 亚洲一区二区三区四区在线免费观看 | 看电影不卡的网站|