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

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

?? borderarrangement.java

?? jfreechart1.0.1 jsp繪制圖表的開發包
?? 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.]
 *
 * ----------------------
 * BorderArrangement.java
 * ----------------------
 * (C) Copyright 2004, 2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: BorderArrangement.java,v 1.14.2.1 2005/10/25 20:39:38 mungady Exp $
 *
 * Changes:
 * --------
 * 22-Oct-2004 : Version 1 (DG);
 * 08-Feb-2005 : Updated for changes in RectangleConstraint (DG);
 * 24-Feb-2005 : Improved arrangeRR() method (DG);
 * 03-May-2005 : Implemented Serializable and added equals() method (DG);
 * 13-May-2005 : Fixed bugs in the arrange() method (DG);
 * 
 */

package org.jfree.chart.block;

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

import org.jfree.data.Range;
import org.jfree.ui.RectangleEdge;
import org.jfree.ui.Size2D;
import org.jfree.util.ObjectUtilities;

/**
 * An arrangement manager that lays out blocks in a similar way to
 * Swing's BorderLayout class.
 */
public class BorderArrangement implements Arrangement, Serializable {
    
    /** For serialization. */
    private static final long serialVersionUID = 506071142274883745L;
    
    /** The block (if any) at the center of the layout. */
    private Block centerBlock;

    /** The block (if any) at the top of the layout. */
    private Block topBlock;
    
    /** The block (if any) at the bottom of the layout. */
    private Block bottomBlock;
    
    /** The block (if any) at the left of the layout. */
    private Block leftBlock;
    
    /** The block (if any) at the right of the layout. */
    private Block rightBlock;
    
    /**
     * Creates a new instance.
     */
    public BorderArrangement() {
    }
    
    /**
     * Adds a block to the arrangement manager at the specified edge.
     * 
     * @param block  the block (<code>null</code> permitted).
     * @param key  the edge (an instance of {@link RectangleEdge}) or 
     *             <code>null</code> for the center block.
     */
    public void add(Block block, Object key) {
        
        if (key == null) {
            this.centerBlock = block;
        }
        else {
            RectangleEdge edge = (RectangleEdge) key;
            if (edge == RectangleEdge.TOP) {
                this.topBlock = block;
            }
            else if (edge == RectangleEdge.BOTTOM) {
                this.bottomBlock = block;
            }
            else if (edge == RectangleEdge.LEFT) {
                this.leftBlock = block;
            }
            else if (edge == RectangleEdge.RIGHT) {
                this.rightBlock = block;
            }
        }
    }
    
    /**
     * Arranges the items in the specified container, subject to the given 
     * constraint.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The block size.
     */
    public Size2D arrange(BlockContainer container, 
                          Graphics2D g2, 
                          RectangleConstraint constraint) {
        RectangleConstraint contentConstraint 
            = container.toContentConstraint(constraint);
        Size2D contentSize = null;
        LengthConstraintType w = contentConstraint.getWidthConstraintType();
        LengthConstraintType h = contentConstraint.getHeightConstraintType();
        if (w == LengthConstraintType.NONE) {
            if (h == LengthConstraintType.NONE) {
                contentSize = 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) {
                contentSize = arrangeFN(container, g2, constraint.getWidth());  
            }
            else if (h == LengthConstraintType.FIXED) {
                contentSize = arrangeFF(container, g2, constraint);  
            }
            else if (h == LengthConstraintType.RANGE) {
                contentSize = arrangeFR(container, g2, constraint);  
            }
        }
        else if (w == LengthConstraintType.RANGE) {
            if (h == LengthConstraintType.NONE) {
                throw new RuntimeException("Not implemented.");  
            }
            else if (h == LengthConstraintType.FIXED) {
                throw new RuntimeException("Not implemented.");  
            }
            else if (h == LengthConstraintType.RANGE) {
                contentSize = arrangeRR(
                    container, constraint.getWidthRange(),
                    constraint.getHeightRange(), g2
                );  
            }
        }
        return new Size2D(
            container.calculateTotalWidth(contentSize.getWidth()),
            container.calculateTotalHeight(contentSize.getHeight())
        );
    }
    
    /**
     * Performs an arrangement without constraints.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * 
     * @return The container size after the arrangement.
     */
    protected Size2D arrangeNN(BlockContainer container, Graphics2D g2) {
        double[] w = new double[5];
        double[] h = new double[5];
        if (this.topBlock != null) {
            Size2D size = this.topBlock.arrange(
                g2, RectangleConstraint.NONE
            );
            w[0] = size.width;
            h[0] = size.height;
        }
        if (this.bottomBlock != null) {
            Size2D size = this.bottomBlock.arrange(
                g2, RectangleConstraint.NONE
            );
            w[1] = size.width;
            h[1] = size.height;
        }
        if (this.leftBlock != null) {
            Size2D size = this.leftBlock.arrange(
                g2, RectangleConstraint.NONE
            );
            w[2] = size.width;
            h[2] = size.height;
       }
        if (this.rightBlock != null) {
            Size2D size = this.rightBlock.arrange(
                g2, RectangleConstraint.NONE
            );
            w[3] = size.width;
            h[3] = size.height;
        }
        
        h[2] = Math.max(h[2], h[3]);
        h[3] = h[2];
        
        if (this.centerBlock != null) {
            Size2D size = this.centerBlock.arrange(
                g2, RectangleConstraint.NONE
            );
            w[4] = size.width;
            h[4] = size.height;
        }
        double width = Math.max(w[0], Math.max(w[1], w[2] + w[4] + w[3]));
        double centerHeight = Math.max(h[2], Math.max(h[3], h[4]));
        double height = h[0] + h[1] + centerHeight;
        if (this.topBlock != null) {
            this.topBlock.setBounds(
                new Rectangle2D.Double(0.0, 0.0, width, h[0])
            );
        }
        if (this.bottomBlock != null) {
            this.bottomBlock.setBounds(
                new Rectangle2D.Double(0.0, height - h[1], width, h[1])
            );
        }
        if (this.leftBlock != null) {
            this.leftBlock.setBounds(
                new Rectangle2D.Double(0.0, h[0], w[2], centerHeight)
            );
        }
        if (this.rightBlock != null) {
            this.rightBlock.setBounds(
                new Rectangle2D.Double(width - w[3], h[0], w[3], centerHeight)
            );
        }
        
        if (this.centerBlock != null) {
            this.centerBlock.setBounds(
                new Rectangle2D.Double(
                    w[2], h[0], width - w[2] - w[3], centerHeight
                )
            );
        }
        return new Size2D(width, height);
    }

    /**
     * Performs an arrangement with a fixed width and a range for the height.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The container size after the arrangement.
     */
    protected Size2D arrangeFR(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {
        Size2D size1 = arrangeFN(container, g2, constraint.getWidth());
        if (constraint.getHeightRange().contains(size1.getHeight())) {
            return size1;   
        }
        else {
            double h = constraint.getHeightRange().constrain(size1.getHeight());
            RectangleConstraint c2 = constraint.toFixedHeight(h);
            return arrange(container, g2, c2);   
        }
    }
    
    /** 
     * Arranges the container width a fixed width and no constraint on the 
     * height.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param width  the fixed width.
     * 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产.欧美.日韩| 国产精品久久三区| 免费成人小视频| 日韩一区二区精品在线观看| 午夜av区久久| 日韩精品一区二区在线| 久久69国产一区二区蜜臀| 2023国产一二三区日本精品2022| 国模套图日韩精品一区二区| 久久久久久免费毛片精品| 成人免费视频视频在线观看免费| 欧美激情综合五月色丁香小说| 99r国产精品| 亚洲综合网站在线观看| 欧美一区二区人人喊爽| 国产黄色精品网站| 亚洲精品成人在线| 欧美一级在线视频| 国产大陆亚洲精品国产| 亚洲欧美日韩久久精品| 91精品国产福利在线观看 | 精品剧情v国产在线观看在线| 国产精品一区二区黑丝| 一区二区三区在线视频播放| 日韩视频中午一区| 成人的网站免费观看| 性久久久久久久久| 精品福利一区二区三区免费视频| 成人福利视频网站| 日韩精品电影在线观看| 国产精品乱码一区二三区小蝌蚪| 欧美日产在线观看| 国产一区二区不卡老阿姨| 亚洲免费av高清| 欧美精品一区二区在线播放| 色婷婷一区二区| 久久精品国产亚洲5555| 亚洲精品高清在线观看| 久久网站热最新地址| 欧美色手机在线观看| 国产成人小视频| 日韩黄色免费网站| 亚洲欧美日韩久久精品| 久久综合五月天婷婷伊人| 欧美四级电影网| 91小视频在线观看| 激情久久五月天| 亚洲成av人片在线观看无码| 国产精品久久久久7777按摩| 日韩精品一区二区在线| 欧美日韩一区二区在线观看 | 国产精品久久久久久一区二区三区| 欧美一区二区私人影院日本| 色天天综合色天天久久| 亚洲麻豆国产自偷在线| 国产欧美日韩另类一区| 欧美电视剧免费全集观看| 欧美日韩精品一区二区三区| 日本高清无吗v一区| 风间由美一区二区三区在线观看 | 色嗨嗨av一区二区三区| 丁香另类激情小说| 美女任你摸久久| 亚洲影院久久精品| 中文字幕五月欧美| 国产欧美综合色| 久久免费的精品国产v∧| 日韩一级在线观看| 欧美日韩三级视频| 在线观看91精品国产入口| 北条麻妃国产九九精品视频| 成人在线视频一区| 福利一区二区在线观看| 国产传媒一区在线| 国产成人超碰人人澡人人澡| 国产传媒日韩欧美成人| 国产成人午夜精品5599| 国产一区二区三区精品欧美日韩一区二区三区| 男女男精品视频网| 麻豆精品国产传媒mv男同| 午夜亚洲福利老司机| 午夜电影一区二区三区| 日韩不卡手机在线v区| 日本aⅴ免费视频一区二区三区| 日韩中文字幕亚洲一区二区va在线| 亚洲成va人在线观看| 午夜精品福利视频网站| 天堂久久久久va久久久久| 天天影视涩香欲综合网| 日韩不卡手机在线v区| 看电视剧不卡顿的网站| 国产一区二区三区蝌蚪| 成人精品一区二区三区四区| 91视频一区二区| 欧美婷婷六月丁香综合色| 欧美日韩视频一区二区| 日韩视频免费观看高清完整版 | 国产aⅴ综合色| 成人美女视频在线观看| 91麻豆国产香蕉久久精品| 在线观看三级视频欧美| 在线不卡中文字幕播放| 欧美不卡在线视频| 国产精品色在线| 一区二区三区四区在线免费观看| 天堂av在线一区| 国产黑丝在线一区二区三区| 91丨porny丨首页| 制服.丝袜.亚洲.另类.中文 | 884aa四虎影成人精品一区| 欧美xxxx在线观看| 国产精品卡一卡二卡三| 亚洲国产精品久久久久秋霞影院| 青青青爽久久午夜综合久久午夜| 国产福利一区二区三区视频| 91麻豆国产自产在线观看| 欧美一级久久久久久久大片| 欧美激情一区二区三区在线| 有码一区二区三区| 全国精品久久少妇| 大胆亚洲人体视频| 91精品国产综合久久久久久久久久 | 国产精品一区二区在线播放| 色av一区二区| 国产偷国产偷亚洲高清人白洁| 最新国产成人在线观看| 免费精品99久久国产综合精品| 99久久精品国产观看| 日韩一卡二卡三卡四卡| 亚洲欧美综合色| 蜜臀91精品一区二区三区| 9i在线看片成人免费| 欧美一级黄色片| 亚洲精品中文在线| 精品一区二区三区久久| 欧美综合一区二区三区| 国产女主播视频一区二区| 亚洲二区视频在线| 高清在线观看日韩| 欧美肥妇bbw| 一区二区三区四区蜜桃| 国产成a人无v码亚洲福利| 欧美情侣在线播放| 亚洲天堂精品在线观看| 国产一区91精品张津瑜| 欧美亚一区二区| 中文字幕日本不卡| 久久99久久99| 欧美一区二区精品| 亚洲一区二区三区四区在线观看 | 欧美大片拔萝卜| 亚洲电影你懂得| 日本韩国欧美在线| 国产欧美中文在线| 极品少妇一区二区三区精品视频| 欧美三级中文字| 亚洲靠逼com| 日本久久精品电影| 亚洲欧美福利一区二区| www..com久久爱| 中文字幕中文字幕中文字幕亚洲无线| 国模套图日韩精品一区二区| 精品成人免费观看| 久久精品国产精品亚洲精品 | 欧美精品一区二区三区很污很色的 | 亚洲欧洲国产日本综合| 成人国产精品免费网站| 欧美经典三级视频一区二区三区| 国产一区二区精品久久99| 日韩你懂的电影在线观看| 奇米影视一区二区三区| 日韩一区二区中文字幕| 免费观看久久久4p| 欧美一级在线视频| 麻豆国产91在线播放| 精品少妇一区二区三区在线播放| 久久99精品国产.久久久久| 日韩欧美国产午夜精品| 美女国产一区二区三区| 久久亚洲春色中文字幕久久久| 国产一区二区三区四区五区美女| 国产亚洲综合色| 成人国产视频在线观看| 亚洲精品久久久蜜桃| 欧美在线一区二区三区| 性感美女久久精品| 日韩免费观看高清完整版 | 狠狠色狠狠色综合| 国产欧美精品区一区二区三区 | 日韩成人精品在线观看| 欧美成人a视频| 成人蜜臀av电影| 午夜不卡av免费| 26uuu国产电影一区二区| 不卡一区二区在线| 亚洲综合图片区| 精品国产乱码久久久久久牛牛| 成人精品高清在线| 亚洲一区二区欧美激情| 日韩一级片在线观看|