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

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

?? cyclicnumberaxis.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? JAVA
?? 第 1 頁 / 共 3 頁
字號(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.]
 *
 * ---------------------
 * CyclicNumberAxis.java
 * ---------------------
 * (C) Copyright 2003, 2004, by Nicolas Brodu and Contributors.
 *
 * Original Author:  Nicolas Brodu;
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *
 * $Id: CyclicNumberAxis.java,v 1.10.2.2 2005/10/25 20:37:34 mungady Exp $
 *
 * Changes
 * -------
 * 19-Nov-2003 : Initial import to JFreeChart from the JSynoptic project (NB);
 * 16-Mar-2004 : Added plotState to draw() method (DG);
 * 07-Apr-2004 : Modifed text bounds calculation (DG);
 * 21-Apr-2005 : Replaced Insets with RectangleInsets, removed redundant
 *               argument in selectAutoTickUnit() (DG);
 * 22-Apr-2005 : Renamed refreshHorizontalTicks() --> refreshTicksHorizontal
 *               (for consistency with other classes) and removed unused
 *               parameters (DG);
 * 08-Jun-2005 : Fixed equals() method to handle GradientPaint (DG);
 *
 */

package org.jfree.chart.axis;

import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Font;
import java.awt.FontMetrics;
import java.awt.Graphics2D;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.Line2D;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.text.NumberFormat;
import java.util.List;

import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.PlotRenderingInfo;
import org.jfree.data.Range;
import org.jfree.io.SerialUtilities;
import org.jfree.text.TextUtilities;
import org.jfree.ui.RectangleEdge;
import org.jfree.ui.TextAnchor;
import org.jfree.util.ObjectUtilities;
import org.jfree.util.PaintUtilities;

/**
This class extends NumberAxis and handles cycling.
 
Traditional representation of data in the range x0..x1
<pre>
|-------------------------|
x0                       x1
</pre> 

Here, the range bounds are at the axis extremities.
With cyclic axis, however, the time is split in 
"cycles", or "time frames", or the same duration : the period.

A cycle axis cannot by definition handle a larger interval 
than the period : <pre>x1 - x0 >= period</pre>. Thus, at most a full 
period can be represented with such an axis.

The cycle bound is the number between x0 and x1 which marks 
the beginning of new time frame:
<pre>
|---------------------|----------------------------|
x0                   cb                           x1
<---previous cycle---><-------current cycle-------->
</pre>

It is actually a multiple of the period, plus optionally 
a start offset: <pre>cb = n * period + offset</pre>

Thus, by definition, two consecutive cycle bounds 
period apart, which is precisely why it is called a 
period.

The visual representation of a cyclic axis is like that:
<pre>
|----------------------------|---------------------|
cb                         x1|x0                  cb
<-------current cycle--------><---previous cycle--->
</pre>

The cycle bound is at the axis ends, then current 
cycle is shown, then the last cycle. When using 
dynamic data, the visual effect is the current cycle 
erases the last cycle as x grows. Then, the next cycle 
bound is reached, and the process starts over, erasing 
the previous cycle.

A Cyclic item renderer is provided to do exactly this.

 */
public class CyclicNumberAxis extends NumberAxis {

    /** The default axis line stroke. */
    public static Stroke DEFAULT_ADVANCE_LINE_STROKE = new BasicStroke(1.0f);
    
    /** The default axis line paint. */
    public static final Paint DEFAULT_ADVANCE_LINE_PAINT = Color.gray;
    
    /** The offset. */
    protected double offset;
    
    /** The period.*/
    protected double period;
    
    /** ??. */
    protected boolean boundMappedToLastCycle;
    
    /** A flag that controls whether or not the advance line is visible. */
    protected boolean advanceLineVisible;

    /** The advance line stroke. */
    protected transient Stroke advanceLineStroke = DEFAULT_ADVANCE_LINE_STROKE;
    
    /** The advance line paint. */
    protected transient Paint advanceLinePaint;
    
    private transient boolean internalMarkerWhenTicksOverlap;
    private transient Tick internalMarkerCycleBoundTick;
    
    /** 
     * Creates a CycleNumberAxis with the given period.
     * 
     * @param period  the period.
     */
    public CyclicNumberAxis(double period) {
        this(period, 0.0);
    }

    /** 
     * Creates a CycleNumberAxis with the given period and offset.
     * 
     * @param period  the period.
     * @param offset  the offset.
     */
    public CyclicNumberAxis(double period, double offset) {
        this(period, offset, null);
    }

    /** 
     * Creates a named CycleNumberAxis with the given period.
     * 
     * @param period  the period.
     * @param label  the label.
     */
    public CyclicNumberAxis(double period, String label) {
        this(0, period, label);
    }
    
    /** 
     * Creates a named CycleNumberAxis with the given period and offset.
     * 
     * @param period  the period.
     * @param offset  the offset.
     * @param label  the label.
     */
    public CyclicNumberAxis(double period, double offset, String label) {
        super(label);
        this.period = period;
        this.offset = offset;
        setFixedAutoRange(period);
        this.advanceLineVisible = true;
        this.advanceLinePaint = DEFAULT_ADVANCE_LINE_PAINT;
    }
        
    /**
     * The advance line is the line drawn at the limit of the current cycle, 
     * when erasing the previous cycle. 
     * 
     * @return A boolean.
     */
    public boolean isAdvanceLineVisible() {
        return this.advanceLineVisible;
    }
    
    /**
     * The advance line is the line drawn at the limit of the current cycle, 
     * when erasing the previous cycle. 
     * 
     * @param visible  the flag.
     */
    public void setAdvanceLineVisible(boolean visible) {
        this.advanceLineVisible = visible;
    }
    
    /**
     * The advance line is the line drawn at the limit of the current cycle, 
     * when erasing the previous cycle. 
     * 
     * @return The paint (never <code>null</code>).
     */
    public Paint getAdvanceLinePaint() {
        return this.advanceLinePaint;
    }

    /**
     * The advance line is the line drawn at the limit of the current cycle, 
     * when erasing the previous cycle. 
     * 
     * @param paint  the paint (<code>null</code> not permitted).
     */
    public void setAdvanceLinePaint(Paint paint) {
        if (paint == null) {
            throw new IllegalArgumentException("Null 'paint' argument.");
        }
        this.advanceLinePaint = paint;
    }
    
    /**
     * The advance line is the line drawn at the limit of the current cycle, 
     * when erasing the previous cycle. 
     * 
     * @return The stroke (never <code>null</code>).
     */
    public Stroke getAdvanceLineStroke() {
        return this.advanceLineStroke;
    }
    /**
     * The advance line is the line drawn at the limit of the current cycle, 
     * when erasing the previous cycle. 
     * 
     * @param stroke  the stroke (<code>null</code> not permitted).
     */
    public void setAdvanceLineStroke(Stroke stroke) {
        if (stroke == null) {
            throw new IllegalArgumentException("Null 'stroke' argument.");
        }
        this.advanceLineStroke = stroke;
    }
    
    /**
     * The cycle bound can be associated either with the current or with the 
     * last cycle.  It's up to the user's choice to decide which, as this is 
     * just a convention.  By default, the cycle bound is mapped to the current
     * cycle.
     * <br>
     * Note that this has no effect on visual appearance, as the cycle bound is
     * mapped successively for both axis ends. Use this function for correct 
     * results in translateValueToJava2D. 
     *  
     * @return <code>true</code> if the cycle bound is mapped to the last 
     *         cycle, <code>false</code> if it is bound to the current cycle 
     *         (default)
     */
    public boolean isBoundMappedToLastCycle() {
        return this.boundMappedToLastCycle;
    }
    
    /**
     * The cycle bound can be associated either with the current or with the 
     * last cycle.  It's up to the user's choice to decide which, as this is 
     * just a convention. By default, the cycle bound is mapped to the current 
     * cycle. 
     * <br>
     * Note that this has no effect on visual appearance, as the cycle bound is
     * mapped successively for both axis ends. Use this function for correct 
     * results in valueToJava2D.
     *  
     * @param boundMappedToLastCycle Set it to true to map the cycle bound to 
     *        the last cycle.
     */
    public void setBoundMappedToLastCycle(boolean boundMappedToLastCycle) {
        this.boundMappedToLastCycle = boundMappedToLastCycle;
    }
    
    /**
     * Selects a tick unit when the axis is displayed horizontally.
     * 
     * @param g2  the graphics device.
     * @param drawArea  the drawing area.
     * @param dataArea  the data area.
     * @param edge  the side of the rectangle on which the axis is displayed.
     */
    protected void selectHorizontalAutoTickUnit(Graphics2D g2,
                                                Rectangle2D drawArea, 
                                                Rectangle2D dataArea,
                                                RectangleEdge edge) {

        double tickLabelWidth 
            = estimateMaximumTickLabelWidth(g2, getTickUnit());
        
        // Compute number of labels
        double n = getRange().getLength() 
                   * tickLabelWidth / dataArea.getWidth();

        setTickUnit(
            (NumberTickUnit) getStandardTickUnits().getCeilingTickUnit(n), 
            false, false
        );
        
     }

    /**
     * Selects a tick unit when the axis is displayed vertically.
     * 
     * @param g2  the graphics device.
     * @param drawArea  the drawing area.
     * @param dataArea  the data area.
     * @param edge  the side of the rectangle on which the axis is displayed.
     */
    protected void selectVerticalAutoTickUnit(Graphics2D g2,
                                                Rectangle2D drawArea, 
                                                Rectangle2D dataArea,
                                                RectangleEdge edge) {

        double tickLabelWidth 
            = estimateMaximumTickLabelWidth(g2, getTickUnit());

        // Compute number of labels
        double n = getRange().getLength() 
                   * tickLabelWidth / dataArea.getHeight();

        setTickUnit(
            (NumberTickUnit) getStandardTickUnits().getCeilingTickUnit(n), 
            false, false
        );
        
     }

    /** 
     * A special Number tick that also hold information about the cycle bound 
     * mapping for this tick.  This is especially useful for having a tick at 
     * each axis end with the cycle bound value.  See also 
     * isBoundMappedToLastCycle()
     */
    protected static class CycleBoundTick extends NumberTick {
        
        /** Map to last cycle. */
        public boolean mapToLastCycle;
        
        /**
         * Creates a new tick.
         * 
         * @param mapToLastCycle  map to last cycle?
         * @param number  the number.
         * @param label  the label.
         * @param textAnchor  the text anchor.
         * @param rotationAnchor  the rotation anchor.
         * @param angle  the rotation angle.
         */
        public CycleBoundTick(boolean mapToLastCycle, Number number, 
                              String label, TextAnchor textAnchor,
                              TextAnchor rotationAnchor, double angle) {
            super(number, label, textAnchor, rotationAnchor, angle);
            this.mapToLastCycle = mapToLastCycle;
        }
    }
    
    /**
     * Calculates the anchor point for a tick.
     * 
     * @param tick  the tick.
     * @param cursor  the cursor.
     * @param dataArea  the data area.
     * @param edge  the side on which the axis is displayed.
     * 
     * @return The anchor point.
     */
    protected float[] calculateAnchorPoint(ValueTick tick, double cursor, 
                                           Rectangle2D dataArea, 
                                           RectangleEdge edge) {
        if (tick instanceof CycleBoundTick) {
            boolean mapsav = this.boundMappedToLastCycle;
            this.boundMappedToLastCycle 
                = ((CycleBoundTick) tick).mapToLastCycle;
            float[] ret = super.calculateAnchorPoint(
                tick, cursor, dataArea, edge
            );
            this.boundMappedToLastCycle = mapsav;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99综合电影在线视频| 国产欧美一区二区精品婷婷| 亚洲在线免费播放| 4438x成人网最大色成网站| 亚洲成人自拍一区| 久久久久久久久岛国免费| 972aa.com艺术欧美| 日韩综合一区二区| 精品久久久久久久一区二区蜜臀| 国产成人av一区二区| 一区二区三区四区五区视频在线观看 | 久久精品国产亚洲aⅴ| 国产日韩欧美在线一区| 欧美日本一区二区三区| av在线这里只有精品| 日韩av一区二区三区| 亚洲精品亚洲人成人网| 精品国产乱码久久久久久图片| 97久久精品人人做人人爽50路| 亚洲国产精品欧美一二99| 欧美韩国日本不卡| 久久在线免费观看| 亚洲精品在线一区二区| 欧美乱妇15p| 精品1区2区3区| 日本国产一区二区| 欧美亚洲免费在线一区| 成人一道本在线| 国产精品一区一区三区| 极品美女销魂一区二区三区| 奇米色一区二区| 日韩高清不卡一区| 日韩国产欧美一区二区三区| 亚洲午夜精品在线| 日本不卡在线视频| 狠狠色丁香久久婷婷综合丁香| 伦理电影国产精品| 国产在线麻豆精品观看| 成人自拍视频在线观看| 国产成人aaa| 在线视频国产一区| 欧美一区二区三区视频在线观看| 欧美一区二区在线观看| 精品国产91久久久久久久妲己 | 国产精品久久久久久久午夜片 | 欧美日韩精品系列| 日韩午夜激情av| 国产精品国产三级国产普通话三级| 自拍av一区二区三区| 日本在线不卡视频一二三区| 国模大尺度一区二区三区| av一区二区三区四区| 欧美一级午夜免费电影| 亚洲欧美一区二区在线观看| 天天综合日日夜夜精品| 成人av免费观看| 91精品国产综合久久精品 | 欧美国产丝袜视频| 亚洲精品欧美二区三区中文字幕| 七七婷婷婷婷精品国产| 91福利社在线观看| 国产精品婷婷午夜在线观看| 男人的天堂久久精品| 91国偷自产一区二区开放时间| 精品国产乱码久久久久久免费| 一区二区视频在线看| 国产精品资源网站| 日韩欧美区一区二| 久久国产精品第一页| 欧美一区三区四区| 天天做天天摸天天爽国产一区 | 成人免费毛片aaaaa**| 欧美精品一区二区不卡| 久久精品国产亚洲5555| 欧美成人性福生活免费看| 裸体一区二区三区| 久久综合久久久久88| 国产激情视频一区二区在线观看| 亚洲精品一区二区三区香蕉| 看国产成人h片视频| 精品久久久久久久久久久久包黑料| 热久久免费视频| 久久久一区二区| 97久久精品人人做人人爽 | 日韩精品一级中文字幕精品视频免费观看 | 国产一区二区调教| 欧美高清在线精品一区| 91美女在线视频| 美女mm1313爽爽久久久蜜臀| 久久奇米777| 91官网在线免费观看| 黄色成人免费在线| 一区二区三区在线视频免费观看| 日韩欧美视频在线| 在线观看亚洲精品| jlzzjlzz亚洲日本少妇| 蜜桃视频在线一区| 亚洲一区二区不卡免费| 欧美xxxxx牲另类人与| 91丨九色丨蝌蚪丨老版| 亚洲国产一区二区视频| 欧美精品1区2区3区| 成人免费观看男女羞羞视频| 看电视剧不卡顿的网站| 亚洲综合免费观看高清完整版| 国产欧美精品一区二区三区四区 | 精品国产免费久久| 亚洲一区在线免费观看| 国产精品一区三区| 欧美日本一道本在线视频| 久久奇米777| 日本aⅴ亚洲精品中文乱码| 99久久免费精品高清特色大片| 91精品国产麻豆| 亚洲一区二区三区中文字幕| 国产成人av自拍| 久久嫩草精品久久久精品| 一区av在线播放| 91首页免费视频| 国产精品午夜免费| 粉嫩高潮美女一区二区三区 | 免费成人av在线| 在线播放亚洲一区| 亚洲国产另类av| 欧美日韩激情在线| 亚洲黄色av一区| 在线观看精品一区| 亚洲一区在线观看视频| 一道本成人在线| 亚洲国产人成综合网站| 在线一区二区三区做爰视频网站| 亚洲欧美在线高清| 在线观看三级视频欧美| 亚洲电影一级黄| 日韩免费一区二区| 国产精品影视在线| 亚洲精品日韩综合观看成人91| 91福利精品视频| 久久99久久久欧美国产| 国产亚洲综合在线| 91女神在线视频| 三级在线观看一区二区| 精品少妇一区二区三区在线视频| 久久99精品国产麻豆不卡| 久久久久久一二三区| 91免费视频观看| 久久99精品久久只有精品| 国产精品网站在线观看| 欧美精品在线观看一区二区| 国产乱国产乱300精品| 一区二区三区精密机械公司| 6080国产精品一区二区| eeuss鲁片一区二区三区在线看| 亚洲一区二区免费视频| 国产亚洲欧美激情| 欧美丰满嫩嫩电影| 91丨porny丨最新| 国产精品一级黄| 青草国产精品久久久久久| 亚洲精品视频观看| 欧美国产一区二区| 精品久久久久久久久久久院品网| 91在线国产福利| 国产福利一区在线| 精品一区二区三区av| 爽好久久久欧美精品| 一区二区三区四区蜜桃 | 色婷婷综合激情| 国产成人av一区二区三区在线| 琪琪一区二区三区| 美女看a上一区| 天堂久久久久va久久久久| 亚洲精品国产精华液| 亚洲三级理论片| 有坂深雪av一区二区精品| 一区二区三区欧美日| 亚洲精品免费播放| 亚洲欧美怡红院| 午夜精品爽啪视频| 日本视频在线一区| 狠狠色丁香婷婷综合| 国产成人一区二区精品非洲| 国产91精品一区二区| 色综合久久久久| 日韩欧美一区二区视频| 精品福利视频一区二区三区| 久久久av毛片精品| 亚洲一区二区三区三| 麻豆免费精品视频| 91女厕偷拍女厕偷拍高清| 欧美精品一卡二卡| 久久综合狠狠综合久久综合88 | 国产午夜亚洲精品不卡| 亚洲天堂福利av| 理论电影国产精品| 99re成人精品视频| 欧美变态凌虐bdsm| 亚洲卡通欧美制服中文| 天堂午夜影视日韩欧美一区二区| 精品一区二区三区在线视频|