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

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

?? crosshairstate.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? JAVA
字號(hào):
/* ===========================================================
 * 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
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
在线这里只有精品| 国产色一区二区| 午夜a成v人精品| 欧美精选一区二区| 天天综合日日夜夜精品| 日韩欧美国产午夜精品| 韩国毛片一区二区三区| 欧美国产一区二区在线观看 | 国产精品久久久久久久岛一牛影视| 久久99久久久久| 中日韩av电影| 欧美变态口味重另类| eeuss鲁片一区二区三区在线观看| 亚洲国产精品成人综合| 欧美色图片你懂的| 国产精品88av| 日本欧美一区二区| 国产精品久久久久精k8| 91精品国产综合久久福利软件| 韩国女主播成人在线| 亚洲午夜在线电影| 国产精品久久久久四虎| 91精品国产麻豆国产自产在线 | 亚洲精品中文在线影院| 欧美精品一区二区三区四区| 亚洲国产高清不卡| 欧美成人一级视频| 91黄视频在线| 国产精品18久久久久久久久| 免费高清在线视频一区·| 国产精品理论在线观看| 久久久久久久综合色一本| 欧美精品免费视频| 欧美午夜精品一区二区三区| 91网站最新地址| 色狠狠av一区二区三区| 欧美色欧美亚洲另类二区| www.亚洲激情.com| 99视频在线精品| 不卡的av中国片| 91黄视频在线| 91精品国产乱码| 久久精品在这里| 国产精品国产三级国产有无不卡| 久久精品免视看| 一区在线观看免费| 一区二区三区欧美在线观看| 亚洲高清一区二区三区| 日韩成人精品视频| 国产不卡视频一区二区三区| 北岛玲一区二区三区四区| 色综合中文字幕国产| 欧洲一区二区三区在线| 欧美一级午夜免费电影| 国产精品久久久久影院老司| 一区二区在线观看免费| 免费看黄色91| 99国产精品视频免费观看| 精品婷婷伊人一区三区三| 久久蜜桃香蕉精品一区二区三区| 中文在线免费一区三区高中清不卡| 一区二区三区在线视频免费观看| 首页国产欧美久久| 91猫先生在线| 国产日韩欧美麻豆| 久久精品国产亚洲5555| 欧美在线你懂得| 亚洲啪啪综合av一区二区三区| 精品一区二区三区不卡 | 99久久综合国产精品| 欧美一级欧美三级在线观看| 亚洲午夜视频在线观看| 91美女在线视频| 亚洲精品高清在线| 成a人片国产精品| 国产精品丝袜一区| 成人精品在线视频观看| 国产人久久人人人人爽| 精品一区二区三区久久久| 欧美一二三四区在线| 日韩经典中文字幕一区| 欧美日韩中文字幕精品| 日韩精品一级二级| 日韩欧美的一区| 国产乱码精品1区2区3区| 久久午夜电影网| 国产99精品视频| 一区二区三区蜜桃网| 欧美高清视频在线高清观看mv色露露十八 | 99久久精品费精品国产一区二区| 亚洲日本在线视频观看| 欧美老年两性高潮| 国产精品一卡二卡在线观看| 国产精品免费看片| 欧美理论在线播放| 国产一区二区三区国产| 亚洲老妇xxxxxx| 久久久久久黄色| 欧美影片第一页| 国产一区二区三区精品欧美日韩一区二区三区 | 精品国产髙清在线看国产毛片| 国产精品对白交换视频| 亚洲色欲色欲www| 99久久精品免费观看| 日韩国产精品久久久| 国产精品视频九色porn| 日韩欧美精品在线视频| 在线视频国产一区| 成人午夜免费视频| 国产一区在线视频| 免费在线看一区| 亚洲成在人线免费| 自拍偷拍国产精品| 亚洲国产精品av| 国产网站一区二区| 久久综合狠狠综合久久综合88| 欧美日韩国产影片| 欧美性生交片4| 欧美裸体一区二区三区| 在线观看成人小视频| 欧美在线不卡一区| 欧美日韩视频在线观看一区二区三区 | 蜜桃一区二区三区在线| 免费黄网站欧美| 韩国欧美国产一区| 成人综合激情网| 9色porny自拍视频一区二区| 色综合久久88色综合天天免费| 成人av在线播放网站| 91豆麻精品91久久久久久| 欧美日韩精品一二三区| 亚洲精品一区二区三区影院| 国产视频911| 亚洲成人av一区| 日本不卡视频一二三区| 粉嫩一区二区三区在线看| 91性感美女视频| 91精品欧美综合在线观看最新| 欧美大白屁股肥臀xxxxxx| 国产欧美日韩视频一区二区| 亚洲欧美区自拍先锋| 美女视频第一区二区三区免费观看网站| 日韩高清在线不卡| 97久久久精品综合88久久| 69堂成人精品免费视频| 综合婷婷亚洲小说| 国产乱妇无码大片在线观看| 欧美私人免费视频| 日韩一区欧美小说| 国产成人亚洲精品狼色在线| 91豆麻精品91久久久久久| 国产精品国产三级国产有无不卡 | 国产精品欧美久久久久一区二区| 亚洲网友自拍偷拍| 在线观看成人小视频| 日本特黄久久久高潮| 日韩中文欧美在线| 色综合欧美在线| 中文字幕一区二区三中文字幕| 精品一区二区日韩| 精品国产乱码久久久久久久| 蜜臀av一区二区在线观看| 欧美系列亚洲系列| 亚洲精品中文字幕乱码三区| 一本到不卡免费一区二区| 亚洲乱码中文字幕| 欧美这里有精品| 蜜臀av一区二区| 欧美大片拔萝卜| 成人app软件下载大全免费| 2021中文字幕一区亚洲| 成人一区二区三区视频 | 91精品国产综合久久精品app| 亚洲综合成人网| 日韩美女视频一区二区在线观看| 日韩 欧美一区二区三区| 国产片一区二区| 欧美视频一区在线| 国产成人精品免费| 国产精品乱人伦| 91麻豆精品国产91久久久更新时间| 久久黄色级2电影| 亚洲欧美日韩精品久久久久| 91精品国产综合久久福利| 不卡大黄网站免费看| 日本欧美大码aⅴ在线播放| 亚洲国产精品黑人久久久| 69久久99精品久久久久婷婷| eeuss鲁片一区二区三区在线观看| 欧美精品18+| 亚洲免费看黄网站| 久久久久国产成人精品亚洲午夜| 91美女片黄在线| 不卡的av在线| 成人亚洲一区二区一| 日韩激情在线观看| 香蕉成人啪国产精品视频综合网 | 久久久www成人免费毛片麻豆| 欧美视频精品在线观看| 99精品国产91久久久久久|