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

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

?? crosshairstate.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.]
 *
 * -------------------
 * CrosshairState.java
 * -------------------
 * (C) Copyright 2002-2004, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: CrosshairState.java,v 1.3.2.1 2005/10/25 20:52:07 mungady Exp $
 *
 * Changes
 * -------
 * 24-Jan-2002 : Version 1 (DG);
 * 05-Mar-2002 : Added Javadoc comments (DG);
 * 26-Sep-2002 : Fixed errors reported by Checkstyle (DG);
 * 19-Sep-2003 : Modified crosshair distance calculation (DG);
 * 04-Dec-2003 : Crosshair anchor point now stored outside chart since it is
 *               dependent on the display target (DG);
 * 25-Feb-2004 : Replaced CrosshairInfo --> CrosshairState (DG);               
 *
 */

package org.jfree.chart.plot;

import java.awt.geom.Point2D;

/**
 * Maintains state information about crosshairs on a plot.
 *
 */
public class CrosshairState {

    /** 
     * A flag that controls whether the distance is calculated in data space 
     * or Java2D space. 
     */
    private boolean calculateDistanceInDataSpace = false;

    /** The x-value (in data space) for the anchor point. */
    private double anchorX;

    /** The y-value (in data space) for the anchor point. */
    private double anchorY;
    
    /** The anchor point in Java2D space - if null, don't update crosshair. */
    private Point2D anchor;
    
    /** The x-value for the crosshair point. */
    private double crosshairX;

    /** The y-value for the crosshair point. */
    private double crosshairY;

    /** 
     * The smallest distance so far between the anchor point and a data point. 
     */
    private double distance;

    /**
     * Default constructor.
     */
    public CrosshairState() {
        this(false);
    }

    /**
     * Creates a new info object.
     * 
     * @param calculateDistanceInDataSpace  a flag that controls whether the 
     *                                      distance is calculated in data 
     *                                      space or Java2D space.
     */
    public CrosshairState(boolean calculateDistanceInDataSpace) {
        this.calculateDistanceInDataSpace = calculateDistanceInDataSpace;
    }

    /**
     * Sets the distance between the anchor point and the current crosshair 
     * point.  As each data point is processed, its distance to the anchor 
     * point is compared with this value and, if it is closer, the data point 
     * becomes the new crosshair point.
     *
     * @param distance  the distance.
     */
    public void setCrosshairDistance(double distance) {
        this.distance = distance;
    }

    /**
     * Evaluates a data point and if it is the closest to the anchor point it
     * becomes the new crosshair point.
     * <P>
     * To understand this method, you need to know the context in which it will
     * be called.  An instance of this class is passed to an 
     * {@link org.jfree.chart.renderer.xy.XYItemRenderer} as
     * each data point is plotted.  As the point is plotted, it is passed to
     * this method to see if it should be the new crosshair point.
     *
     * @param x  x coordinate (measured against the domain axis).
     * @param y  y coordinate (measured against the range axis).
     * @param transX  x translated into Java2D space.
     * @param transY  y translated into Java2D space.
     * @param orientation  the plot orientation.
     */
    public void updateCrosshairPoint(double x, double y, 
                                     double transX, double transY, 
                                     PlotOrientation orientation) {

        if (this.anchor != null) {
            double d = 0.0;
            if (this.calculateDistanceInDataSpace) {
                d = (x - this.anchorX) * (x - this.anchorX)
                  + (y - this.anchorY) * (y - this.anchorY);
            }
            else {
                double xx = this.anchor.getX();
                double yy = this.anchor.getY();
                if (orientation == PlotOrientation.HORIZONTAL) {
                    double temp = yy;
                    yy = xx;
                    xx = temp;
                }
                d = (transX - xx) * (transX - xx) 
                    + (transY - yy) * (transY - yy);            
            }

            if (d < this.distance) {
                this.crosshairX = x;
                this.crosshairY = y;
                this.distance = d;
            }
        }

    }

    /**
     * Evaluates an x-value and if it is the closest to the anchor point it
     * becomes the new crosshair point.
     * <P>
     * Used in cases where only the x-axis is numerical.
     *
     * @param candidateX  x position of the candidate for the new crosshair 
     *                    point.
     */
    public void updateCrosshairX(double candidateX) {

        double d = Math.abs(candidateX - this.anchorX);
        if (d < this.distance) {
            this.crosshairX = candidateX;
            this.distance = d;
        }

    }

    /**
     * Evaluates a y-value and if it is the closest to the anchor point it
     * becomes the new crosshair point.
     * <P>
     * Used in cases where only the y-axis is numerical.
     *
     * @param candidateY  y position of the candidate for the new crosshair 
     *                    point.
     */
    public void updateCrosshairY(double candidateY) {

        double d = Math.abs(candidateY - this.anchorY);
        if (d < this.distance) {
            this.crosshairY = candidateY;
            this.distance = d;
        }

    }

    /** 
     * Sets the anchor point.  This is usually the mouse click point in a chart
     * panel, and the crosshair point will often be the data item that is 
     * closest to the anchor point.
     * 
     * @param anchor  the anchor point.
     */
    public void setAnchor(Point2D anchor) {
        this.anchor = anchor;
    }
    
    /**
     * Get the x-value for the crosshair point.
     *
     * @return The x position of the crosshair point.
     */
    public double getCrosshairX() {
        return this.crosshairX;
    }
    
    /**
     * Sets the x coordinate for the crosshair.  This is the coordinate in data
     * space measured against the domain axis.
     * 
     * @param x the coordinate.
     */
    public void setCrosshairX(double x) {
        this.crosshairX = x;
    }

    /**
     * Get the y-value for the crosshair point.  This is the coordinate in data
     * space measured against the range axis.
     *
     * @return The y position of the crosshair point.
     */
    public double getCrosshairY() {
        return this.crosshairY;
    }

    /**
     * Sets the y coordinate for the crosshair.
     * 
     * @param y  the y coordinate.
     */
    public void setCrosshairY(double y) {
        this.crosshairY = y;
    }

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
成人一级视频在线观看| 亚洲黄色免费网站| 九九国产精品视频| 欧美精品一区二区三区蜜桃 | 国产精品美女久久久久高潮| 国产一区二区不卡老阿姨| 久久综合久久久久88| 成人污污视频在线观看| 日韩美女视频一区| 欧美日韩国产一二三| 免费不卡在线观看| 久久精品免视看| 色综合久久久久综合体桃花网| 一区二区三区高清不卡| 欧美精品日韩一区| 国产麻豆欧美日韩一区| 国产精品久久久久精k8| 欧美午夜精品久久久久久超碰| 日韩精品一级二级 | 色诱视频网站一区| 日韩 欧美一区二区三区| 欧美精品一区二| 成人精品视频一区二区三区 | 亚洲女子a中天字幕| 日本韩国欧美国产| 久久aⅴ国产欧美74aaa| 国产精品嫩草影院com| 精品视频一区三区九区| 国产麻豆欧美日韩一区| 亚洲欧美激情小说另类| 精品免费日韩av| 97超碰欧美中文字幕| 日本美女一区二区| 国产精品久久久99| 日韩欧美一级二级三级久久久| 成人av影视在线观看| 视频一区欧美精品| 国产精品网站在线播放| 在线不卡中文字幕| 99精品视频在线播放观看| 蜜桃精品在线观看| 亚洲精品视频在线| 国产肉丝袜一区二区| 欧美日韩亚洲丝袜制服| caoporn国产精品| 韩国在线一区二区| 丝袜亚洲另类欧美| 亚洲人妖av一区二区| 欧美xxxxx裸体时装秀| 91啦中文在线观看| 成人在线视频一区| 黄色资源网久久资源365| 午夜亚洲福利老司机| ...av二区三区久久精品| 2014亚洲片线观看视频免费| 欧美日韩一区二区三区高清| 91丨porny丨中文| 国产精品18久久久久久久久| 免费看精品久久片| 亚洲一二三区视频在线观看| 中文字幕一区二区三| 国产视频在线观看一区二区三区| 欧美一区二区免费视频| 欧美日韩五月天| 欧洲一区在线电影| 94-欧美-setu| 91麻豆精品视频| 99麻豆久久久国产精品免费| 国产成人精品影视| 国产精品一区二区果冻传媒| 另类人妖一区二区av| 蜜桃视频一区二区三区在线观看| 日韩黄色一级片| 日韩中文字幕av电影| 天堂蜜桃一区二区三区| 婷婷开心激情综合| 亚洲bt欧美bt精品777| 亚洲高清久久久| 亚洲va欧美va人人爽| 日韩精品亚洲专区| 免费一级欧美片在线观看| 美脚の诱脚舐め脚责91| 国内久久精品视频| 国产精品18久久久久| 国产成人综合自拍| 99久久婷婷国产精品综合| 99r精品视频| 在线免费av一区| 欧美无乱码久久久免费午夜一区| 欧美午夜免费电影| 91精品国产欧美一区二区成人| 欧美一区二区私人影院日本| 日韩欧美卡一卡二| 国产欧美日韩视频在线观看| 国产精品久久久久三级| 一区二区三区美女| 美女任你摸久久| 成人爽a毛片一区二区免费| 99久久精品免费| 欧美精品乱码久久久久久按摩| 91麻豆精品国产91久久久久久| 日韩精品在线一区二区| 欧美激情自拍偷拍| 一区二区理论电影在线观看| 日韩电影网1区2区| 成人性生交大片免费看视频在线| 91丨porny丨在线| 欧美高清视频一二三区 | 日韩一区二区免费高清| 久久精品视频免费| 中文字幕一区日韩精品欧美| 亚洲高清免费观看高清完整版在线观看| 青青草91视频| eeuss鲁片一区二区三区| 欧美精品色综合| 国产精品免费视频网站| 午夜精品视频一区| 国产精品888| 欧美日韩国产精品自在自线| 国产婷婷色一区二区三区在线| 亚洲精选一二三| 国产一区中文字幕| 欧美午夜一区二区三区| 中文字幕高清一区| 青青草国产精品亚洲专区无| caoporm超碰国产精品| 日韩精品自拍偷拍| 一区二区三区四区亚洲| 国产在线精品一区二区不卡了| 91香蕉视频黄| 久久久99久久精品欧美| 亚洲国产乱码最新视频| 国产精品羞羞答答xxdd| 欧美人xxxx| 亚洲人123区| 国产综合色产在线精品| 欧美日韩国产天堂| 亚洲色图视频免费播放| 国产精品亚洲成人| 日韩精品综合一本久道在线视频| 亚洲影院理伦片| 91视频观看视频| 国产日韩综合av| 韩国女主播一区二区三区| 欧美精品123区| 亚洲国产成人tv| 91免费在线视频观看| 国产色产综合色产在线视频| 久久精品国产99国产| 欧美剧在线免费观看网站| 亚洲精品高清在线观看| av爱爱亚洲一区| 国产精品丝袜在线| 国产一区不卡视频| 日韩欧美电影在线| 秋霞午夜av一区二区三区| 精品视频色一区| 亚洲成a人在线观看| 在线视频综合导航| 亚洲女女做受ⅹxx高潮| 成人aa视频在线观看| 国产精品欧美一级免费| 粉嫩绯色av一区二区在线观看| 久久亚洲精华国产精华液 | 国产日韩欧美一区二区三区综合| 久久精品久久久精品美女| 欧美一三区三区四区免费在线看| 亚洲国产三级在线| 欧美高清性hdvideosex| 日韩av一区二区三区| 日韩午夜精品电影| 久久99精品视频| 久久伊人蜜桃av一区二区| 国产一区二区三区久久悠悠色av| 久久影音资源网| www.欧美.com| 亚洲精品一二三| 欧美人与禽zozo性伦| 蜜臀久久99精品久久久久宅男| 欧美一区二区播放| 精品中文字幕一区二区小辣椒| 亚洲精品一区二区三区影院 | 亚洲靠逼com| 欧美日韩国产免费| 免费在线一区观看| 久久久久久久久久电影| 大白屁股一区二区视频| 一区二区在线电影| 91精品国产一区二区| 国产二区国产一区在线观看| 亚洲欧洲日产国码二区| 欧美在线观看禁18| 美女爽到高潮91| 日本一区二区视频在线观看| 99在线热播精品免费| 性欧美大战久久久久久久久| 精品国产露脸精彩对白| eeuss鲁一区二区三区| 天堂在线一区二区| 国产欧美日韩不卡免费|