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

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

?? centerarrangement.java

?? jfreechart1.0.1 jsp繪制圖表的開發包
?? 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.]
 *
 * ----------------------
 * CenterArrangement.java
 * ----------------------
 * (C) Copyright 2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: CenterArrangement.java,v 1.3.2.1 2005/10/25 20:39:38 mungady Exp $
 *
 * Changes:
 * --------
 * 08-Mar-2005 : Version 1 (DG);
 * 
 */

package org.jfree.chart.block;

import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.io.Serializable;
import java.util.List;

import org.jfree.ui.Size2D;

/**
 * Arranges a block in the center of its container.  This class is immutable.
 */
public class CenterArrangement implements Arrangement, Serializable {
    
    /** For serialization. */
    private static final long serialVersionUID = -353308149220382047L; 
    
    /**
     * Creates a new instance.
     */
    public CenterArrangement() {   
    }
     
    /**
     * Adds a block to be managed by this instance.  This method is usually 
     * called by the {@link BlockContainer}, you shouldn't need to call it 
     * directly.
     * 
     * @param block  the block.
     * @param key  a key that controls the position of the block.
     */
    public void add(Block block, Object key) {
        // since the flow layout is relatively straightforward, 
        // no information needs to be recorded here
    }
    
    /**
     * Calculates and sets the bounds of all the items in the specified 
     * container, subject to the given constraint.  The <code>Graphics2D</code>
     * can be used by some items (particularly items containing text) to 
     * calculate sizing parameters.
     * 
     * @param container  the container whose items are being arranged.
     * @param g2  the graphics device.
     * @param constraint  the size constraint.
     * 
     * @return The size of the container after arrangement of the contents.
     */
    public Size2D arrange(BlockContainer container, Graphics2D g2,
                          RectangleConstraint constraint) {
        
        LengthConstraintType w = constraint.getWidthConstraintType();
        LengthConstraintType h = constraint.getHeightConstraintType();
        if (w == LengthConstraintType.NONE) {
            if (h == LengthConstraintType.NONE) {
                return arrangeNN(container, g2);  
            }
            else if (h == LengthConstraintType.FIXED) {
                throw new RuntimeException("Not implemented.");  
            }
            else if (h == LengthConstraintType.RANGE) {
                throw new RuntimeException("Not implemented.");  
            }
        }
        else if (w == LengthConstraintType.FIXED) {
            if (h == LengthConstraintType.NONE) {
                return arrangeFN(container, g2, constraint);  
            }
            else if (h == LengthConstraintType.FIXED) {
                throw new RuntimeException("Not implemented.");  
            }
            else if (h == LengthConstraintType.RANGE) {
                throw new RuntimeException("Not implemented.");  
            }
        }
        else if (w == LengthConstraintType.RANGE) {
            if (h == LengthConstraintType.NONE) {
                return arrangeRN(container, g2, constraint);  
            }
            else if (h == LengthConstraintType.FIXED) {
                return arrangeRF(container, g2, constraint);  
            }
            else if (h == LengthConstraintType.RANGE) {
                return arrangeRR(container, g2, constraint);   
            }
        }
        throw new IllegalArgumentException("Unknown LengthConstraintType.");
        
    }

    /**
     * Arranges the blocks in the container with a fixed width and no height 
     * constraint.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The size.
     */
    protected Size2D arrangeFN(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {
        
        List blocks = container.getBlocks();
        Block b = (Block) blocks.get(0);
        Size2D s = b.arrange(g2, RectangleConstraint.NONE);
        double width = constraint.getWidth();
        Rectangle2D bounds = new Rectangle2D.Double(
            (width - s.width) / 2.0, 0.0, s.width, s.height
        );
        b.setBounds(bounds);
        return new Size2D((width - s.width) / 2.0, s.height);  
    }
    
    /**
     * Arranges the blocks in the container with a fixed with and a range
     * constraint on the height.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The size following the arrangement.
     */
    protected Size2D arrangeFR(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {

        Size2D s = arrangeFN(container, g2, constraint);
        if (constraint.getHeightRange().contains(s.height)) {
            return s;   
        }
        else {
            RectangleConstraint c = constraint.toFixedHeight(
                constraint.getHeightRange().constrain(s.getHeight())
            );
            return arrangeFF(container, g2, c);
        }
    }

    /**
     * Arranges the blocks in the container with the overall height and width
     * specified as fixed constraints.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The size following the arrangement.
     */
    protected Size2D arrangeFF(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {

        // TODO: implement this properly
        return arrangeFN(container, g2, constraint);
    }

    /**
     * Arranges the blocks with the overall width and height to fit within 
     * specified ranges.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The size after the arrangement.
     */
    protected Size2D arrangeRR(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {

        // first arrange without constraints, and see if this fits within
        // the required ranges...
        Size2D s1 = arrangeNN(container, g2);
        if (constraint.getWidthRange().contains(s1.width)) {
            return s1;  // TODO: we didn't check the height yet
        }
        else {
            RectangleConstraint c = constraint.toFixedWidth(
                constraint.getWidthRange().getUpperBound()
            );
            return arrangeFR(container, g2, c);
        }
    }
    
    /**
     * Arranges the blocks in the container with a range constraint on the
     * width and a fixed height.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The size following the arrangement.
     */
    protected Size2D arrangeRF(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {

        Size2D s = arrangeNF(container, g2, constraint);
        if (constraint.getWidthRange().contains(s.width)) {
            return s;   
        }
        else {
            RectangleConstraint c = constraint.toFixedWidth(
                constraint.getWidthRange().constrain(s.getWidth())
            );
            return arrangeFF(container, g2, c);
        }
    }

    /**
     * Arranges the block with a range constraint on the width, and no 
     * constraint on the height.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The size following the arrangement.
     */
    protected Size2D arrangeRN(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {
        // first arrange without constraints, then see if the width fits
        // within the required range...if not, call arrangeFN() at max width
        Size2D s1 = arrangeNN(container, g2);
        if (constraint.getWidthRange().contains(s1.width)) {
            return s1;   
        }
        else {
            RectangleConstraint c = constraint.toFixedWidth(
                constraint.getWidthRange().getUpperBound()
            );
            return arrangeFN(container, g2, c);
        }
    }
    
    /**
     * Arranges the blocks without any constraints.  This puts all blocks
     * into a single row.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * 
     * @return The size after the arrangement.
     */
    protected Size2D arrangeNN(BlockContainer container, Graphics2D g2) {
        List blocks = container.getBlocks();
        Block b = (Block) blocks.get(0);
        Size2D s = b.arrange(g2, RectangleConstraint.NONE);
        return new Size2D(s.width, s.height);  
    }
    
    /**
     * Arranges the blocks with no width constraint and a fixed height 
     * constraint.  This puts all blocks into a single row.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The size after the arrangement.
     */
    protected Size2D arrangeNF(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {
        // TODO: for now we are ignoring the height constraint
        return arrangeNN(container, g2);
    }
    
    /**
     * Clears any cached information.
     */
    public void clear() {
        // no action required.
    }
    
    /**
     * Tests this instance for equality with an arbitrary object.
     * 
     * @param obj  the object (<code>null</code> permitted).
     * 
     * @return A boolean.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;   
        }
        if (!(obj instanceof CenterArrangement)) {
            return false;   
        }
        return true;
    }
    
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产成人在线视频网址| 91丨九色丨蝌蚪丨老版| 成人手机在线视频| 欧美三级中文字| 久久久久久麻豆| 天天影视涩香欲综合网| 成人午夜激情视频| 欧美一级日韩一级| 一区二区国产视频| 99视频在线精品| 欧美xxxxxxxxx| 亚洲成av人在线观看| 高清不卡一区二区在线| 日韩女优av电影在线观看| 一区二区三区日韩欧美精品| 国产盗摄女厕一区二区三区 | 国产91色综合久久免费分享| 欧美日韩亚洲综合一区二区三区 | 国内精品伊人久久久久av影院| 一本一道波多野结衣一区二区| 国产亚洲精品aa午夜观看| 久久99国产乱子伦精品免费| 欧美日韩国产综合久久| 亚洲精品免费播放| 99热99精品| 亚洲欧洲日韩在线| 成人av在线网站| 亚洲欧洲日韩一区二区三区| a美女胸又www黄视频久久| 中文字幕成人在线观看| 国产91精品精华液一区二区三区| 精品成人a区在线观看| 老司机精品视频导航| 日韩色在线观看| 精品无人区卡一卡二卡三乱码免费卡 | 五月激情丁香一区二区三区| 欧美日韩午夜在线视频| 亚洲欧美日韩中文播放| 色天使色偷偷av一区二区| 亚洲欧美一区二区三区孕妇| 91免费观看视频在线| 亚洲男人电影天堂| 欧美三级资源在线| 日韩avvvv在线播放| 欧美一区二区三区在线| 麻豆视频一区二区| 久久久久久久久久看片| 成人sese在线| 亚洲永久免费视频| 91精品国产入口| 韩国午夜理伦三级不卡影院| 国产人久久人人人人爽| 成人av片在线观看| 亚洲自拍与偷拍| 欧美成人一区二区三区片免费 | 色诱亚洲精品久久久久久| 亚洲夂夂婷婷色拍ww47| 欧美一区二区三区在| 国产福利电影一区二区三区| 中文字幕在线不卡国产视频| 欧美色图天堂网| 加勒比av一区二区| 17c精品麻豆一区二区免费| 欧美日韩一区 二区 三区 久久精品| 日韩电影在线观看电影| 国产午夜精品理论片a级大结局| 色婷婷久久99综合精品jk白丝| 五月天丁香久久| 国产日韩成人精品| 欧美日韩午夜影院| 成人不卡免费av| 免费在线一区观看| 自拍偷拍欧美精品| 日韩三级在线观看| 色噜噜狠狠成人中文综合| 蜜桃视频在线观看一区| 亚洲三级在线播放| 精品国产1区二区| 欧美色偷偷大香| 国产不卡一区视频| 视频一区视频二区中文字幕| 国产精品免费丝袜| 91精品福利在线一区二区三区| 99久久久无码国产精品| 久草在线在线精品观看| 亚洲精品五月天| 欧美国产日韩a欧美在线观看 | 99re成人精品视频| 精品一区二区久久| 亚洲成人在线免费| 最近日韩中文字幕| 久久精品男人天堂av| 日韩视频免费直播| 欧美日产在线观看| 色天天综合色天天久久| 丁香婷婷综合色啪| 国产呦萝稀缺另类资源| 日本视频一区二区| 亚洲成人动漫在线免费观看| 亚洲欧美一区二区三区久本道91| 国产日韩三级在线| 精品成人佐山爱一区二区| 日韩一级欧美一级| 538在线一区二区精品国产| 在线日韩av片| 色综合天天综合狠狠| www.日韩精品| 成人精品国产一区二区4080| 国产寡妇亲子伦一区二区| 国产一区高清在线| 经典三级在线一区| 精品一区二区日韩| 国产精品原创巨作av| 国产一区在线精品| 国内精品视频666| 国产中文字幕精品| 国产精品一区免费视频| 久久99精品网久久| 狠狠色狠狠色综合| 国产麻豆91精品| 国产成人亚洲综合色影视| 国产91色综合久久免费分享| 成人午夜精品一区二区三区| 从欧美一区二区三区| 99久久精品免费| 色偷偷久久人人79超碰人人澡| 91久久国产最好的精华液| 欧洲人成人精品| 69久久99精品久久久久婷婷| 91精品国产高清一区二区三区蜜臀 | 99热这里都是精品| 在线中文字幕一区二区| 欧美三级日韩三级| 欧美一区二区国产| 久久久青草青青国产亚洲免观| 欧美国产精品久久| 亚洲美女免费视频| 午夜精品久久久久久| 老司机精品视频导航| 成人激情视频网站| 欧美色综合影院| 日韩精品一区二区三区中文不卡 | 欧美成人精精品一区二区频| 久久免费看少妇高潮| 亚洲欧洲日韩av| 日韩不卡在线观看日韩不卡视频| 狠狠色伊人亚洲综合成人| 成人av电影免费在线播放| 日本黄色一区二区| 日韩女优电影在线观看| 亚洲丝袜自拍清纯另类| 日韩精品久久理论片| 国产黄色精品网站| 欧美亚洲动漫精品| 国产亚洲一区二区三区四区| 一区二区三区国产豹纹内裤在线| 蜜乳av一区二区三区| 成人免费视频一区| 欧美一区二区三区不卡| 国产精品免费观看视频| 视频精品一区二区| 99久久精品免费看国产| 日韩一级黄色大片| 亚洲精品第1页| 国内精品免费**视频| 欧美色图片你懂的| 国产精品日产欧美久久久久| 视频一区二区欧美| 色狠狠桃花综合| 久久久久久久久久久黄色| 午夜成人免费视频| av亚洲精华国产精华| 久久青草国产手机看片福利盒子 | 中文久久乱码一区二区| 日韩国产欧美在线观看| 91在线观看下载| 久久综合久色欧美综合狠狠| 午夜免费欧美电影| 色综合天天综合在线视频| 国产欧美日韩一区二区三区在线观看| 午夜一区二区三区在线观看| 91在线视频18| 中文字幕国产一区二区| 国产精品一区二区x88av| 日韩一区二区精品葵司在线| 亚洲制服丝袜一区| 欧美综合色免费| 亚洲乱码国产乱码精品精98午夜| 国产乱国产乱300精品| 日韩欧美在线1卡| 五月婷婷色综合| 欧美日韩成人高清| 亚洲图片欧美视频| 欧美午夜视频网站| 亚洲一区在线视频| 在线欧美日韩国产| 亚洲国产一区二区三区青草影视| 一本一道久久a久久精品| 亚洲精品第一国产综合野| 色综合久久综合网欧美综合网|