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

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

?? barrenderer3d.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* ===========================================================
 * 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.]
 *
 * ------------------
 * BarRenderer3D.java
 * ------------------
 * (C) Copyright 2001-2004, by Serge V. Grachov and Contributors.
 *
 * Original Author:  Serge V. Grachov;
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *                   Tin Luu;
 *                   Milo Simpson;
 *                   Richard Atkinson;
 *                   Rich Unger;
 *                   Christian W. Zuckschwerdt;
 *
 * $Id: BarRenderer3D.java,v 1.10.2.3 2005/10/25 20:54:16 mungady Exp $
 *
 * Changes
 * -------
 * 31-Oct-2001 : First version, contributed by Serge V. Grachov (DG);
 * 15-Nov-2001 : Modified to allow for null data values (DG);
 * 13-Dec-2001 : Added tooltips (DG);
 * 16-Jan-2002 : Added fix for single category or single series datasets, 
 *               pointed out by Taoufik Romdhane (DG);
 * 24-May-2002 : Incorporated tooltips into chart entities (DG);
 * 11-Jun-2002 : Added check for (permitted) null info object, bug and fix 
 *               reported by David Basten.  Also updated Javadocs. (DG);
 * 19-Jun-2002 : Added code to draw labels on bars (TL);
 * 26-Jun-2002 : Added bar clipping to avoid PRExceptions (DG);
 * 05-Aug-2002 : Small modification to drawCategoryItem method to support URLs 
 *               for HTML image maps (RA);
 * 06-Aug-2002 : Value labels now use number formatter, thanks to Milo 
 *               Simpson (DG);
 * 08-Aug-2002 : Applied fixed in bug id 592218 (DG);
 * 20-Sep-2002 : Added fix for categoryPaint by Rich Unger, and fixed errors 
 *               reported by Checkstyle (DG);
 * 24-Oct-2002 : Amendments for changes in CategoryDataset interface and 
 *               CategoryToolTipGenerator interface (DG);
 * 05-Nov-2002 : Replaced references to CategoryDataset with TableDataset (DG);
 * 06-Nov-2002 : Moved to the com.jrefinery.chart.renderer package (DG);
 * 28-Jan-2003 : Added an attribute to control the shading of the left and 
 *               bottom walls in the plot background (DG);
 * 25-Mar-2003 : Implemented Serializable (DG);
 * 10-Apr-2003 : Removed category paint usage (DG);
 * 13-May-2003 : Renamed VerticalBarRenderer3D --> BarRenderer3D and merged with
 *               HorizontalBarRenderer3D (DG);
 * 30-Jul-2003 : Modified entity constructor (CZ);
 * 19-Aug-2003 : Implemented Cloneable and PublicCloneable (DG);
 * 07-Oct-2003 : Added renderer state (DG);
 * 08-Oct-2003 : Removed clipping (replaced with flag in CategoryPlot to 
 *               control order in which the data items are processed) (DG);
 * 20-Oct-2003 : Fixed bug (outline stroke not being used for bar 
 *               outlines) (DG);
 * 21-Oct-2003 : Bar width moved into CategoryItemRendererState (DG);
 * 24-Nov-2003 : Fixed bug 846324 (item labels not showing) (DG);
 * 27-Nov-2003 : Added code to respect maxBarWidth setting (DG);
 * 02-Feb-2004 : Fixed bug where 'drawBarOutline' flag is not respected (DG);
 * 10-Feb-2004 : Small change to drawItem() method to make cut-and-paste 
 *               overriding easier (DG);
 * 04-Oct-2004 : Fixed bug with item label positioning when plot alignment is 
 *               horizontal (DG);
 * 05-Nov-2004 : Modified drawItem() signature (DG);
 * 20-Apr-2005 : Renamed CategoryLabelGenerator 
 *               --> CategoryItemLabelGenerator (DG);
 * 25-Apr-2005 : Override initialise() method to fix bug 1189642 (DG);
 * 09-Jun-2005 : Use addEntityItem from super class (DG);
 */

package org.jfree.chart.renderer.category;

import java.awt.AlphaComposite;
import java.awt.Color;
import java.awt.Composite;
import java.awt.Font;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.Paint;
import java.awt.Stroke;
import java.awt.geom.GeneralPath;
import java.awt.geom.Line2D;
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.chart.Effect3D;
import org.jfree.chart.axis.CategoryAxis;
import org.jfree.chart.axis.ValueAxis;
import org.jfree.chart.entity.EntityCollection;
import org.jfree.chart.labels.CategoryItemLabelGenerator;
import org.jfree.chart.labels.ItemLabelAnchor;
import org.jfree.chart.labels.ItemLabelPosition;
import org.jfree.chart.plot.CategoryPlot;
import org.jfree.chart.plot.Marker;
import org.jfree.chart.plot.Plot;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.chart.plot.PlotRenderingInfo;
import org.jfree.chart.plot.ValueMarker;
import org.jfree.data.Range;
import org.jfree.data.category.CategoryDataset;
import org.jfree.io.SerialUtilities;
import org.jfree.text.TextUtilities;
import org.jfree.ui.LengthAdjustmentType;
import org.jfree.ui.RectangleAnchor;
import org.jfree.ui.RectangleEdge;
import org.jfree.ui.TextAnchor;
import org.jfree.util.PublicCloneable;

/**
 * A renderer for bars with a 3D effect, for use with the 
 * {@link org.jfree.chart.plot.CategoryPlot} class.
 *
 * @author Serge V. Grachov
 */
public class BarRenderer3D extends BarRenderer 
                           implements Effect3D, Cloneable, PublicCloneable, 
                                      Serializable {

    /** For serialization. */
    private static final long serialVersionUID = 7686976503536003636L;
    
    /** The default x-offset for the 3D effect. */
    public static final double DEFAULT_X_OFFSET = 12.0;

    /** The default y-offset for the 3D effect. */
    public static final double DEFAULT_Y_OFFSET = 8.0;

    /** The default wall paint. */
    public static final Paint DEFAULT_WALL_PAINT = new Color(0xDD, 0xDD, 0xDD);

    /** The size of x-offset for the 3D effect. */
    private double xOffset;

    /** The size of y-offset for the 3D effect. */
    private double yOffset;

    /** The paint used to shade the left and lower 3D wall. */
    private transient Paint wallPaint;

    /**
     * Default constructor, creates a renderer with a ten pixel '3D effect'.
     */
    public BarRenderer3D() {
        this(DEFAULT_X_OFFSET, DEFAULT_Y_OFFSET);
    }

    /**
     * Constructs a new renderer with the specified '3D effect'.
     *
     * @param xOffset  the x-offset for the 3D effect.
     * @param yOffset  the y-offset for the 3D effect.
     */
    public BarRenderer3D(double xOffset, double yOffset) {

        super();
        this.xOffset = xOffset;
        this.yOffset = yOffset;
        this.wallPaint = DEFAULT_WALL_PAINT;
        // set the default item label positions
        ItemLabelPosition p1 = new ItemLabelPosition(
            ItemLabelAnchor.INSIDE12, TextAnchor.TOP_CENTER
        );
        setPositiveItemLabelPosition(p1);
        ItemLabelPosition p2 = new ItemLabelPosition(
            ItemLabelAnchor.INSIDE12, TextAnchor.TOP_CENTER
        );
        setNegativeItemLabelPosition(p2);

    }

    /**
     * Returns the x-offset for the 3D effect.
     *
     * @return The 3D effect.
     */
    public double getXOffset() {
        return this.xOffset;
    }

    /**
     * Returns the y-offset for the 3D effect.
     *
     * @return The 3D effect.
     */
    public double getYOffset() {
        return this.yOffset;
    }

    /**
     * Returns the paint used to highlight the left and bottom wall in the plot
     * background.
     *
     * @return The paint.
     */
    public Paint getWallPaint() {
        return this.wallPaint;
    }

    /**
     * Sets the paint used to hightlight the left and bottom walls in the plot
     * background.
     *
     * @param paint  the paint.
     */
    public void setWallPaint(Paint paint) {
        this.wallPaint = paint;
    }


    /**
     * Initialises the renderer and returns a state object that will be passed 
     * to subsequent calls to the drawItem method.  This method gets called 
     * once at the start of the process of drawing a chart.
     *
     * @param g2  the graphics device.
     * @param dataArea  the area in which the data is to be plotted.
     * @param plot  the plot.
     * @param rendererIndex  the renderer index.
     * @param info  collects chart rendering information for return to caller.
     * 
     * @return The renderer state.
     */
    public CategoryItemRendererState initialise(Graphics2D g2,
                                                Rectangle2D dataArea,
                                                CategoryPlot plot,
                                                int rendererIndex,
                                                PlotRenderingInfo info) {

        Rectangle2D adjusted = new Rectangle2D.Double(
            dataArea.getX(), dataArea.getY() + getYOffset(),
            dataArea.getWidth() - getXOffset(), 
            dataArea.getHeight() - getYOffset()
        );
        CategoryItemRendererState state = super.initialise(
            g2, adjusted, plot, rendererIndex, info
        );
        return state;
        
    }
    
    /**
     * Draws the background for the plot.
     *
     * @param g2  the graphics device.
     * @param plot  the plot.
     * @param dataArea  the area inside the axes.
     */
    public void drawBackground(Graphics2D g2, CategoryPlot plot, 
                               Rectangle2D dataArea) {

        float x0 = (float) dataArea.getX();
        float x1 = x0 + (float) Math.abs(this.xOffset);
        float x3 = (float) dataArea.getMaxX();
        float x2 = x3 - (float) Math.abs(this.xOffset);

        float y0 = (float) dataArea.getMaxY();
        float y1 = y0 - (float) Math.abs(this.yOffset);
        float y3 = (float) dataArea.getMinY();
        float y2 = y3 + (float) Math.abs(this.yOffset);

        GeneralPath clip = new GeneralPath();
        clip.moveTo(x0, y0);
        clip.lineTo(x0, y2);
        clip.lineTo(x1, y3);
        clip.lineTo(x3, y3);
        clip.lineTo(x3, y1);
        clip.lineTo(x2, y0);
        clip.closePath();

        // fill background...
        Paint backgroundPaint = plot.getBackgroundPaint();
        if (backgroundPaint != null) {
            g2.setPaint(backgroundPaint);
            g2.fill(clip);
        }

        GeneralPath leftWall = new GeneralPath();
        leftWall.moveTo(x0, y0);
        leftWall.lineTo(x0, y2);
        leftWall.lineTo(x1, y3);
        leftWall.lineTo(x1, y1);
        leftWall.closePath();
        g2.setPaint(getWallPaint());
        g2.fill(leftWall);

        GeneralPath bottomWall = new GeneralPath();
        bottomWall.moveTo(x0, y0);
        bottomWall.lineTo(x1, y1);
        bottomWall.lineTo(x3, y1);
        bottomWall.lineTo(x2, y0);
        bottomWall.closePath();
        g2.setPaint(getWallPaint());
        g2.fill(bottomWall);

        // higlight the background corners...
        g2.setPaint(Color.lightGray);
        Line2D corner = new Line2D.Double(x0, y0, x1, y1);
        g2.draw(corner);
        corner.setLine(x1, y1, x1, y3);
        g2.draw(corner);
        corner.setLine(x1, y1, x3, y1);
        g2.draw(corner);

        // draw background image, if there is one...
        Image backgroundImage = plot.getBackgroundImage();
        if (backgroundImage != null) {
            Composite originalComposite = g2.getComposite();
            g2.setComposite(
                AlphaComposite.getInstance(
                    AlphaComposite.SRC, plot.getBackgroundAlpha()
                )
            );
            g2.drawImage(
                backgroundImage,
                (int) x1, (int) y3,
                (int) (x3 - x1 + 1), (int) (y1 - y3 + 1),
                null
            );
            g2.setComposite(originalComposite);
        }

    }

    /**
     * Draws the outline for the plot.
     *
     * @param g2  the graphics device.
     * @param plot  the plot.
     * @param dataArea  the area inside the axes.
     */
    public void drawOutline(Graphics2D g2, CategoryPlot plot, 
                            Rectangle2D dataArea) {

        float x0 = (float) dataArea.getX();
        float x1 = x0 + (float) Math.abs(this.xOffset);
        float x3 = (float) dataArea.getMaxX();
        float x2 = x3 - (float) Math.abs(this.xOffset);

        float y0 = (float) dataArea.getMaxY();
        float y1 = y0 - (float) Math.abs(this.yOffset);
        float y3 = (float) dataArea.getMinY();
        float y2 = y3 + (float) Math.abs(this.yOffset);

        GeneralPath clip = new GeneralPath();
        clip.moveTo(x0, y0);
        clip.lineTo(x0, y2);
        clip.lineTo(x1, y3);
        clip.lineTo(x3, y3);
        clip.lineTo(x3, y1);
        clip.lineTo(x2, y0);
        clip.closePath();

        // put an outline around the data area...
        Stroke outlineStroke = plot.getOutlineStroke();
        Paint outlinePaint = plot.getOutlinePaint();

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
韩国精品一区二区| 国产精品久久一卡二卡| 午夜欧美电影在线观看| 精品视频999| 日日夜夜精品视频天天综合网| 欧美日本国产一区| 免费欧美在线视频| 久久奇米777| 99精品欧美一区二区蜜桃免费| 成人免费一区二区三区在线观看 | 精品成人在线观看| 国产伦精品一区二区三区在线观看 | 精品日韩在线一区| 国产福利一区在线| 亚洲另类色综合网站| 337p亚洲精品色噜噜| 国产一二精品视频| 亚洲免费大片在线观看| 欧美一区二区三区精品| 国产成人在线电影| 一区二区三区在线视频播放| 日韩欧美国产wwwww| 国产ts人妖一区二区| 一区二区三区免费看视频| 日韩视频永久免费| 成人丝袜高跟foot| 日韩不卡一区二区三区 | 欧美喷水一区二区| 国产一区二区三区美女| 一区二区三区国产| 国产午夜亚洲精品不卡| 欧美日韩精品欧美日韩精品一 | 欧美色大人视频| 久久机这里只有精品| 亚洲丝袜制服诱惑| 精品卡一卡二卡三卡四在线| 91年精品国产| 国产在线不卡一卡二卡三卡四卡| 亚洲裸体xxx| 国产三级一区二区三区| 欧美日韩1区2区| 91麻豆国产精品久久| 久久99精品久久久久久| 亚洲国产视频一区| 18欧美亚洲精品| 久久久www成人免费毛片麻豆 | 91麻豆自制传媒国产之光| 麻豆精品国产传媒mv男同| 亚洲欧美日韩一区| 欧美国产精品一区| 精品国产sm最大网站免费看| 欧美另类一区二区三区| 91丨porny丨中文| 国产成a人亚洲精| 久久超碰97人人做人人爱| 丝袜亚洲精品中文字幕一区| 亚洲日本va在线观看| 中文字幕精品三区| 久久久亚洲国产美女国产盗摄 | 成人免费看黄yyy456| 麻豆精品一区二区综合av| 亚洲国产成人av网| 一区二区三区影院| 自拍偷拍亚洲激情| 国产精品天天摸av网| 国产亚洲精品aa| 欧美精品一区二区三区蜜桃| 337p粉嫩大胆色噜噜噜噜亚洲| 91精品国产欧美一区二区| 欧美日韩国产免费一区二区| 欧美午夜精品免费| 欧美日韩电影一区| 欧美日韩一级黄| 这里只有精品电影| 日韩一区二区三区免费看| 91精品国产综合久久精品| 欧美丰满少妇xxxbbb| 日韩欧美aaaaaa| 精品国产一区二区精华| 久久欧美中文字幕| 中文字幕不卡在线观看| 国产精品理论在线观看| 国产精品久久久久一区| 亚洲欧美日韩系列| 亚洲成人在线观看视频| 日韩精品乱码av一区二区| 裸体歌舞表演一区二区| 国产精品综合在线视频| 不卡一区二区在线| 色天天综合久久久久综合片| 欧洲国产伦久久久久久久| 欧美麻豆精品久久久久久| 91精品欧美久久久久久动漫| 日韩欧美国产电影| 久久精品视频在线看| 成人免费在线播放视频| 午夜精品123| 国产一区二区三区免费看| 99久久国产综合精品色伊| 在线观看成人小视频| 日韩一级片网址| 国产精品色噜噜| 亚洲超丰满肉感bbw| 裸体歌舞表演一区二区| 成人一级黄色片| 欧美视频一区二区三区四区| 日韩一区二区精品在线观看| 国产女主播一区| 亚洲成人一区在线| 国产成人在线视频免费播放| 欧美亚洲禁片免费| 久久一日本道色综合| 亚洲精品成人在线| 国内精品免费在线观看| 在线一区二区三区做爰视频网站| 91精选在线观看| 国产精品少妇自拍| 人人狠狠综合久久亚洲| proumb性欧美在线观看| 欧美电影影音先锋| 国产精品美女www爽爽爽| 午夜精品福利一区二区三区av| 国产成人99久久亚洲综合精品| 欧美日韩国产美| 国产精品欧美一区二区三区| 日韩激情一区二区| 色网站国产精品| 国产日韩欧美不卡| 日本三级亚洲精品| 99久久精品费精品国产一区二区| 精品伦理精品一区| 性做久久久久久久免费看| 成人亚洲一区二区一| 精品噜噜噜噜久久久久久久久试看 | 日韩一区二区三区在线观看| 中文字幕欧美一| 国产一区欧美一区| 欧美高清激情brazzers| 亚洲欧美日本在线| 国产成人在线网站| 精品久久久久久无| 亚洲二区视频在线| 91在线看国产| 久久久91精品国产一区二区三区| 日韩国产精品久久久久久亚洲| 色综合久久99| 国产精品久久久久一区二区三区| 国产一区二区三区在线观看免费| 欧美疯狂性受xxxxx喷水图片| 一区二区三区加勒比av| 99精品视频一区二区三区| 中文成人综合网| 国产精品一二三在| 久久亚洲一区二区三区明星换脸| 韩日av一区二区| 精品国产一区二区三区不卡| 日本成人在线一区| 91麻豆精品国产91久久久久| 亚洲国产欧美一区二区三区丁香婷| 成人一二三区视频| 国产精品久久久久三级| 成人高清免费观看| 亚洲国产精品t66y| 成人天堂资源www在线| 亚洲国产精品成人久久综合一区 | 亚洲图片欧美激情| av成人动漫在线观看| 国产精品久久午夜夜伦鲁鲁| 成人av在线播放网站| 国产精品卡一卡二| 91麻豆免费观看| 亚洲黄色免费电影| 精品视频在线免费看| 爽好久久久欧美精品| 91精品啪在线观看国产60岁| 美女高潮久久久| 久久久久青草大香线综合精品| 顶级嫩模精品视频在线看| 国产精品久久久久久久岛一牛影视| 成人v精品蜜桃久久一区| 亚洲久草在线视频| 欧美日韩激情一区二区三区| 老汉av免费一区二区三区| 日韩精品一区二区三区在线| 国产福利一区在线| 日韩理论在线观看| 精品污污网站免费看| 久久成人免费网| 中文字幕欧美激情| 欧美曰成人黄网| 免费观看日韩电影| 国产精品美女久久久久久久| 欧美中文字幕一区二区三区| 日本欧美大码aⅴ在线播放| 日韩精品一区二区三区视频在线观看 | 成人app在线观看| 亚洲一区二区视频| 日韩女优制服丝袜电影| 成人av在线播放网址| 午夜精品福利一区二区三区av|