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

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

?? imagetitle.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.]
 *
 * ---------------
 * ImageTitle.java
 * ---------------
 * (C) Copyright 2000-2005, by David Berry and Contributors;
 *
 * Original Author:  David Berry;
 * Contributor(s):   David Gilbert (for Object Refinery Limited);
 *
 * $Id: ImageTitle.java,v 1.8.2.2 2005/11/01 21:39:53 mungady Exp $
 *
 * Changes (from 18-Sep-2001)
 * --------------------------
 * 18-Sep-2001 : Added standard header (DG);
 * 07-Nov-2001 : Separated the JCommon Class Library classes, JFreeChart now 
 *               requires jcommon.jar (DG);
 * 09-Jan-2002 : Updated Javadoc comments (DG);
 * 07-Feb-2002 : Changed blank space around title from Insets --> Spacer, to 
 *               allow for relative or absolute spacing (DG);
 * 25-Jun-2002 : Updated import statements (DG);
 * 23-Sep-2002 : Fixed errors reported by Checkstyle (DG);
 * 26-Nov-2002 : Added method for drawing images at left or right (DG);
 * 22-Sep-2003 : Added checks that the Image can never be null (TM).
 * 11-Jan-2005 : Removed deprecated code in preparation for the 1.0.0 
 *               release (DG);    
 * 02-Feb-2005 : Changed padding mechanism for all titles (DG);
 * 20-Apr-2005 : Added new draw() method (DG);   
 * 
 */

package org.jfree.chart.title;

import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.geom.Rectangle2D;

import org.jfree.chart.event.TitleChangeEvent;
import org.jfree.ui.HorizontalAlignment;
import org.jfree.ui.RectangleEdge;
import org.jfree.ui.RectangleInsets;
import org.jfree.ui.Size2D;
import org.jfree.ui.VerticalAlignment;

/**
 * A chart title that displays an image.  This is useful, for example, if you
 * have an image of your corporate logo and want to use as a footnote or part
 * of a title in a chart you create.
 * <P>
 * ImageTitle needs an image passed to it in the constructor.  For ImageTitle
 * to work, you must have already loaded this image from its source (disk or
 * URL).  It is recomended you use something like
 * Toolkit.getDefaultToolkit().getImage() to get the image.  Then, use
 * MediaTracker or some other message to make sure the image is fully loaded
 * from disk.
 *
 * @author David Berry
 */
public class ImageTitle extends Title {

    /** The title image. */
    private Image image;

    /**
     * Creates a new image title.
     *
     * @param image  the image (<code>null</code> not permitted).
     */
    public ImageTitle(Image image) {
        this(image, image.getHeight(null), image.getWidth(null), 
                Title.DEFAULT_POSITION, Title.DEFAULT_HORIZONTAL_ALIGNMENT,
                Title.DEFAULT_VERTICAL_ALIGNMENT, Title.DEFAULT_PADDING);
    }

    /**
     * Creates a new image title.
     *
     * @param image  the image (<code>null</code> not permitted).
     * @param position  the title position.
     * @param horizontalAlignment  the horizontal alignment.
     * @param verticalAlignment  the vertical alignment.
     */
    public ImageTitle(Image image, RectangleEdge position, 
                      HorizontalAlignment horizontalAlignment, 
                      VerticalAlignment verticalAlignment) {

        this(image, image.getHeight(null), image.getWidth(null),
                position, horizontalAlignment, verticalAlignment, 
                Title.DEFAULT_PADDING);
    }

    /**
     * Creates a new image title with the given image scaled to the given
     * width and height in the given location.
     *
     * @param image  the image (<code>null</code> not permitted).
     * @param height  the height used to draw the image.
     * @param width  the width used to draw the image.
     * @param position  the title position.
     * @param horizontalAlignment  the horizontal alignment.
     * @param verticalAlignment  the vertical alignment.
     * @param padding  the amount of space to leave around the outside of the 
     *                 title.
     */
    public ImageTitle(Image image, int height, int width, 
                      RectangleEdge position,
                      HorizontalAlignment horizontalAlignment, 
                      VerticalAlignment verticalAlignment,
                      RectangleInsets padding) {

        super(position, horizontalAlignment, verticalAlignment, padding);
        if (image == null) {
            throw new NullPointerException("Null 'image' argument.");
        }
        this.image = image;
        setHeight(height);
        setWidth(width);

    }

    /**
     * Returns the image for the title.
     *
     * @return The image for the title (never <code>null</code>).
     */
    public Image getImage() {
        return this.image;
    }

    /**
     * Sets the image for the title and notifies registered listeners that the
     * title has been modified.
     *
     * @param image  the new image (<code>null</code> not permitted).
     */
    public void setImage(Image image) {
        if (image == null) {
            throw new NullPointerException("Null 'image' argument.");
        }
        this.image = image;
        notifyListeners(new TitleChangeEvent(this));
    }

    /**
     * Draws the title on a Java 2D graphics device (such as the screen or a 
     * printer).
     *
     * @param g2  the graphics device.
     * @param titleArea  the area within which the title (and plot) should be 
     *                   drawn.
     */
    public void draw(Graphics2D g2, Rectangle2D titleArea) {

        RectangleEdge position = getPosition();
        if (position == RectangleEdge.TOP || position == RectangleEdge.BOTTOM) {
            drawHorizontal(g2, titleArea);
        }
        else if (position == RectangleEdge.LEFT 
                     || position == RectangleEdge.RIGHT) {
            drawVertical(g2, titleArea);
        }
        else {
            throw new RuntimeException("Invalid title position.");
        }
    }

    /**
     * Draws the title on a Java 2D graphics device (such as the screen or a 
     * printer).
     *
     * @param g2  the graphics device.
     * @param chartArea  the area within which the title (and plot) should be 
     *                   drawn.
     *
     * @return The size of the area used by the title.
     */
    protected Size2D drawHorizontal(Graphics2D g2, Rectangle2D chartArea) {

        double startY = 0.0;
        double topSpace = 0.0;
        double bottomSpace = 0.0;
        double leftSpace = 0.0;
        double rightSpace = 0.0;

        double w = getWidth();
        double h = getHeight();
        RectangleInsets padding = getPadding();
        topSpace = padding.calculateTopOutset(h);
        bottomSpace = padding.calculateBottomOutset(h);
        leftSpace = padding.calculateLeftOutset(w);
        rightSpace = padding.calculateRightOutset(w);

        if (getPosition() == RectangleEdge.TOP) {
            startY = chartArea.getY() + topSpace;
        }
        else {
            startY = chartArea.getY() + chartArea.getHeight() - bottomSpace - h;
        }

        // what is our alignment?
        HorizontalAlignment horizontalAlignment = getHorizontalAlignment();
        double startX = 0.0;
        if (horizontalAlignment == HorizontalAlignment.CENTER) {
            startX = chartArea.getX() + leftSpace + chartArea.getWidth() / 2.0 
                     - w / 2.0;
        }
        else if (horizontalAlignment == HorizontalAlignment.LEFT) {
            startX = chartArea.getX() + leftSpace;
        }
        else if (horizontalAlignment == HorizontalAlignment.RIGHT) {
            startX = chartArea.getX() + chartArea.getWidth() - rightSpace - w;
        }
        g2.drawImage(this.image, (int) startX, (int) startY, (int) w, (int) h, 
                null);

        return new Size2D(chartArea.getWidth() + leftSpace + rightSpace,
            h + topSpace + bottomSpace);

    }

    /**
     * Draws the title on a Java 2D graphics device (such as the screen or a 
     * printer).
     *
     * @param g2  the graphics device.
     * @param chartArea  the area within which the title (and plot) should be 
     *                   drawn.
     *
     * @return The size of the area used by the title.
     */
    protected Size2D drawVertical(Graphics2D g2, Rectangle2D chartArea) {

        double startX = 0.0;
        double topSpace = 0.0;
        double bottomSpace = 0.0;
        double leftSpace = 0.0;
        double rightSpace = 0.0;

        double w = getWidth();
        double h = getHeight();
        
        RectangleInsets padding = getPadding();
        if (padding != null) {
            topSpace = padding.calculateTopOutset(h);
            bottomSpace = padding.calculateBottomOutset(h);
            leftSpace = padding.calculateLeftOutset(w);
            rightSpace = padding.calculateRightOutset(w);
        }

        if (getPosition() == RectangleEdge.LEFT) {
            startX = chartArea.getX() + leftSpace;
        }
        else {
            startX = chartArea.getMaxX() - rightSpace - w;
        }

        // what is our alignment?
        VerticalAlignment alignment = getVerticalAlignment();
        double startY = 0.0;
        if (alignment == VerticalAlignment.CENTER) {
            startY = chartArea.getMinY() + topSpace 
                     + chartArea.getHeight() / 2.0 - h / 2.0;
        }
        else if (alignment == VerticalAlignment.TOP) {
            startY = chartArea.getMinY() + topSpace;
        }
        else if (alignment == VerticalAlignment.BOTTOM) {
            startY = chartArea.getMaxY() - bottomSpace - h;
        }

        g2.drawImage(this.image, (int) startX, (int) startY, (int) w, (int) h, 
                null);

        return new Size2D(chartArea.getWidth() + leftSpace + rightSpace,
            h + topSpace + bottomSpace);

    }
    
    /**
     * Draws the block within the specified area.
     * 
     * @param g2  the graphics device.
     * @param area  the area.
     * @param params  ignored (<code>null</code> permitted).
     * 
     * @return Always <code>null</code>.
     */
    public Object draw(Graphics2D g2, Rectangle2D area, Object params) {
        draw(g2, area);
        return null;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色噜噜偷拍精品综合在线| 精品在线免费视频| 欧美激情一区不卡| 国产欧美日韩另类一区| 91精品国产91综合久久蜜臀| 欧美日产国产精品| 欧美精品乱码久久久久久按摩 | 99这里只有精品| 成人av在线一区二区三区| 成人免费视频国产在线观看| 成人午夜私人影院| 日本精品一区二区三区高清| 在线精品亚洲一区二区不卡| 91麻豆精品国产91久久久使用方法 | 91麻豆免费看片| 欧美综合色免费| 欧美高清视频不卡网| 亚洲精品一区二区三区四区高清| 精品国产91洋老外米糕| 欧美国产精品中文字幕| 一区二区三区国产豹纹内裤在线| 亚洲成人7777| 国产老肥熟一区二区三区| av中文一区二区三区| 91精品免费观看| 国产清纯美女被跳蛋高潮一区二区久久w| 中文字幕va一区二区三区| 亚洲欧美一区二区三区极速播放| 午夜久久久久久久久| 精品一区二区三区蜜桃| 91小视频免费看| 欧美一区二区免费| 亚洲色图欧洲色图婷婷| 精品在线视频一区| 欧美在线观看一二区| 久久久久97国产精华液好用吗| 亚洲人成人一区二区在线观看| 日本大胆欧美人术艺术动态| 成人a区在线观看| 欧美成人福利视频| 亚洲国产综合色| 国产+成+人+亚洲欧洲自线| 欧美浪妇xxxx高跟鞋交| 亚洲国产精品99久久久久久久久 | 欧美v日韩v国产v| 亚洲日本在线a| 国产成人在线视频网站| 欧美一区二区在线视频| 一区二区三区精品视频| 懂色中文一区二区在线播放| 91精品国产综合久久香蕉麻豆 | 欧美亚洲国产一区二区三区| 2020国产精品自拍| 日本系列欧美系列| 欧美日韩国产bt| 亚洲欧美激情小说另类| 国产精品综合二区| 日韩美一区二区三区| 午夜精品福利久久久| 色哟哟一区二区在线观看| 国产人久久人人人人爽| 国产精品亚洲一区二区三区在线| 91精品国产综合久久久蜜臀图片| 亚洲国产日韩av| 91豆麻精品91久久久久久| 中文字幕色av一区二区三区| 国产成人精品亚洲午夜麻豆| 久久综合狠狠综合久久综合88| 日韩激情一二三区| 88在线观看91蜜桃国自产| 亚洲成国产人片在线观看| 欧美三级中文字| 天天综合日日夜夜精品| 91精品国产色综合久久ai换脸| 亚洲成人免费av| 欧美日韩国产色站一区二区三区| 一区二区三区日韩在线观看| 欧美三日本三级三级在线播放| 亚洲一卡二卡三卡四卡无卡久久 | 免费成人深夜小野草| 欧美精品免费视频| 美女久久久精品| 精品伦理精品一区| 紧缚奴在线一区二区三区| 精品国产百合女同互慰| 国产一区欧美一区| 国产精品乱码一区二三区小蝌蚪| eeuss鲁片一区二区三区| 亚洲综合色自拍一区| 欧美军同video69gay| 久久99精品久久久久久久久久久久 | 一本色道久久综合亚洲91| 一区二区三区在线影院| 91精品国产综合久久久久| 精品夜夜嗨av一区二区三区| 国产精品天美传媒| 欧美影院一区二区三区| 久久国产精品一区二区| 中文字幕欧美日韩一区| 欧美日韩另类国产亚洲欧美一级| 美女一区二区视频| 国产精品久久久久一区二区三区共 | 久久夜色精品一区| 99在线热播精品免费| 天天av天天翘天天综合网色鬼国产| 欧美一级黄色录像| 成人污污视频在线观看| 亚洲一区二区三区影院| 国产网站一区二区| 欧美日韩国产高清一区二区| 国产成人午夜精品影院观看视频| 亚洲综合成人在线视频| 久久久久久免费毛片精品| 色av成人天堂桃色av| 久久99国产精品尤物| 玉米视频成人免费看| 欧美草草影院在线视频| 欧美在线观看一区二区| 不卡影院免费观看| 美国精品在线观看| 亚洲自拍偷拍网站| 国产精品女上位| 欧美一区二区三区四区在线观看| 成人综合在线观看| 国产最新精品免费| 蜜桃视频在线一区| 亚洲国产精品精华液网站| 国产精品天美传媒| 国产视频一区二区三区在线观看| 欧美一区日韩一区| 欧美日韩国产首页在线观看| av电影天堂一区二区在线观看| 极品美女销魂一区二区三区| 亚洲地区一二三色| 亚洲最大色网站| 亚洲人xxxx| 亚洲视频一二三区| 国产精品色一区二区三区| 久久久久9999亚洲精品| 精品国产91九色蝌蚪| 91精选在线观看| 欧美熟乱第一页| 欧美综合在线视频| 欧美午夜精品免费| 欧美日韩1区2区| 制服丝袜在线91| 91 com成人网| 日韩视频免费观看高清完整版在线观看 | 欧美精品一区二区三区四区| 91精品婷婷国产综合久久性色| 在线免费观看日本欧美| 一本色道**综合亚洲精品蜜桃冫| 成人免费毛片aaaaa**| 成人亚洲一区二区一| eeuss鲁一区二区三区| 色系网站成人免费| 欧美亚洲禁片免费| 欧美一区二区三区四区高清| 91精品福利在线一区二区三区| 在线综合视频播放| 久久夜色精品国产欧美乱极品| xnxx国产精品| 中文一区二区完整视频在线观看| 国产精品萝li| 亚洲电影视频在线| 久久97超碰国产精品超碰| 国产suv精品一区二区三区| 成人av网站在线观看免费| 色综合激情五月| 欧美精选在线播放| 精品国产乱码久久久久久久| 欧美激情中文不卡| 亚洲国产成人va在线观看天堂| 五月激情六月综合| 国产中文字幕一区| 一本大道久久精品懂色aⅴ| 欧美色综合久久| 久久影院午夜片一区| 最新中文字幕一区二区三区 | 韩国女主播成人在线| 大陆成人av片| 欧美日韩中文精品| 久久噜噜亚洲综合| 亚洲综合免费观看高清在线观看| 日韩经典中文字幕一区| 成人免费av资源| 欧美三级在线看| 国产免费观看久久| 天堂精品中文字幕在线| 粉嫩久久99精品久久久久久夜| 欧美午夜精品一区二区蜜桃 | 91日韩在线专区| 欧美成人一区二区三区片免费| 亚洲精品视频免费观看| 久久国产福利国产秒拍| 99久久精品情趣| 久久婷婷国产综合精品青草| 亚洲国产精品久久久久婷婷884| 国产一区二区美女诱惑| 欧美老女人第四色|