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

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

?? gridarrangement.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? JAVA
字號(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.]
 *
 * --------------------
 * GridArrangement.java
 * --------------------
 * (C) Copyright 2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: GridArrangement.java,v 1.6.2.1 2005/10/25 20:39:38 mungady Exp $
 *
 * Changes:
 * --------
 * 08-Feb-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.Iterator;
import java.util.List;

import org.jfree.ui.Size2D;

/**
 * Arranges blocks in a grid within their container.
 */
public class GridArrangement implements Arrangement, Serializable {
    
    /** For serialization. */
    private static final long serialVersionUID = -2563758090144655938L;
    
    /** The rows. */
    private int rows;
    
    /** The columns. */
    private int columns;
    
    /**
     * Creates a new grid arrangement.
     * 
     * @param rows  the row count.
     * @param columns  the column count.
     */
    public GridArrangement(int rows, int columns) {
        this.rows = rows;
        this.columns = columns;
    }
    
    /**
     * Adds a block and a key which can be used to determine the position of 
     * the block in the arrangement.  This method is called by the container 
     * (you don't need to call this method directly) and gives the arrangement
     * an opportunity to record the details if they are required.
     * 
     * @param block  the block.
     * @param key  the key (<code>null</code> permitted).
     */
    public void add(Block block, Object key) {
        // can safely ignore   
    }
    
    /**
     * Arranges the blocks within the specified container, subject to the given
     * constraint.
     * 
     * @param container  the container.
     * @param constraint  the constraint.
     * @param g2  the graphics device.
     * 
     * @return The size following the arrangement.
     */
    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 yet implemented.");  
            }
            else if (h == LengthConstraintType.RANGE) {
                // find optimum height, then map to range
                throw new RuntimeException("Not yet implemented.");  
            }
        }
        else if (w == LengthConstraintType.FIXED) {
            if (h == LengthConstraintType.NONE) {
                // find optimum height
                return arrangeFN(container, g2, constraint);  
            }
            else if (h == LengthConstraintType.FIXED) {
                return arrangeFF(container, g2, constraint);
            }
            else if (h == LengthConstraintType.RANGE) {
                // find optimum height and map to range
                return arrangeFR(container, g2, constraint);  
            }
        }
        else if (w == LengthConstraintType.RANGE) {
            // find optimum width and map to range
            if (h == LengthConstraintType.NONE) {
                // find optimum height
                throw new RuntimeException("Not yet implemented.");  
            }
            else if (h == LengthConstraintType.FIXED) {
                // fixed width
                throw new RuntimeException("Not yet implemented.");  
            }
            else if (h == LengthConstraintType.RANGE) {
                throw new RuntimeException("Not yet implemented.");  
            }
        }
        return new Size2D();  // TODO: complete this
    }
    
    /**
     * Arranges the container with no constraint on the width or height.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * 
     * @return The size.
     */
    protected Size2D arrangeNN(BlockContainer container, Graphics2D g2) {
        double maxW = 0.0;
        double maxH = 0.0;
        List blocks = container.getBlocks();
        Iterator iterator = blocks.iterator();
        while (iterator.hasNext()) {
            Block b = (Block) iterator.next();
            Size2D s = b.arrange(g2, RectangleConstraint.NONE);
            maxW = Math.max(maxW, s.width);
            maxH = Math.max(maxH, s.height);
        }
        double width = this.columns * maxW;
        double height = this.rows * maxH;
        RectangleConstraint c = new RectangleConstraint(width, height);
        return arrangeFF(container, g2, c);
    }
    
    /**
     * Arranges the container with a fixed overall width and height.
     * 
     * @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) {
        double width = constraint.getWidth() /  this.columns;
        double height = constraint.getHeight() / this.rows;
        List blocks = container.getBlocks();
        for (int c = 0; c < this.columns; c++) {
            for (int r = 0; r < this.rows; r++) {
                int index = r * this.columns + c;
                if (index == blocks.size()) {
                    break;   
                }
                Block b = (Block) blocks.get(index);
                b.setBounds(new Rectangle2D.Double(
                    c * width, r * height, width, height
                ));
            }
        }
        return new Size2D(this.columns * width, this.rows * height);
    }

    /**
     * Arrange with a fixed width and a height within a given range.
     * 
     * @param container  the container.
     * @param constraint  the constraint.
     * @param g2  the graphics device.
     * 
     * @return The size of the arrangement.
     */
    protected Size2D arrangeFR(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {
        
        RectangleConstraint c1 = constraint.toUnconstrainedHeight();
        Size2D size1 = arrange(container, g2, c1);

        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);
        }
    }

    /**
     * Arrange with a fixed width and a height within a given range.
     * 
     * @param container  the container.
     * @param g2  the graphics device.
     * @param constraint  the constraint.
     * 
     * @return The size of the arrangement.
     */
    protected Size2D arrangeFN(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {
        
        double width = constraint.getWidth() /  this.columns;
        RectangleConstraint constraint2 = constraint.toFixedWidth(width);
        List blocks = container.getBlocks();
        double maxH = 0.0;
        for (int r = 0; r < this.rows; r++) {
            for (int c = 0; c < this.columns; c++) {
                int index = r * this.columns + c;
                if (index == blocks.size()) {
                    break;   
                }
                Block b = (Block) blocks.get(index);
                Size2D s = b.arrange(g2, constraint2);
                maxH = Math.max(maxH, s.getHeight());
            }
        }
        RectangleConstraint constraint3 = constraint.toFixedHeight(
            maxH * this.rows
        );
        return arrange(container, g2, constraint3);
    }

    /**
     * Clears any cached layout information retained by the arrangement.
     */
    public void clear() {
        // nothing to clear   
    }
    
    /**
     * Compares this layout manager for equality with an arbitrary object.
     * 
     * @param obj  the object.
     * 
     * @return A boolean.
     */
    public boolean equals(Object obj) {
        if (obj == this) {
            return true;
        }
        if (!(obj instanceof GridArrangement)) {
            return false;   
        }
        GridArrangement that = (GridArrangement) obj;
        if (this.columns != that.columns) {
            return false;   
        }
        if (this.rows != that.rows) {
            return false;   
        }
        return true;
    }

}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久人人爽爽爽人久久久| 精品国产污污免费网站入口| 日韩国产精品久久久| 久久久五月婷婷| 欧美午夜精品一区二区三区| 国产91在线|亚洲| 日韩高清不卡一区二区| 最新日韩在线视频| 国产女人水真多18毛片18精品视频| 欧美亚洲动漫精品| 91视频精品在这里| 国产**成人网毛片九色| 久久精品999| 亚洲图片欧美综合| 亚洲免费伊人电影| 国产精品无遮挡| 精品国产免费视频| 欧美一区日韩一区| 欧美日韩在线播放一区| 99精品视频在线观看免费| 国产成人自拍在线| 国内国产精品久久| 久久97超碰国产精品超碰| 五月天欧美精品| 一区二区理论电影在线观看| 1区2区3区欧美| 国产精品女人毛片| 国产精品丝袜91| 国产精品三级av| 国产精品国产三级国产aⅴ中文 | 亚洲最大成人综合| 国产精品电影院| 日韩一区中文字幕| 国产精品亲子伦对白| 国产欧美日产一区| 国产日韩综合av| 国产日韩欧美一区二区三区综合| 日韩美女视频一区二区在线观看| 91麻豆精品国产91久久久久 | 99精品视频在线免费观看| 成人黄色在线网站| 99精品视频在线观看免费| 91啪亚洲精品| 欧美午夜宅男影院| 91精品国产综合久久福利| 91精品免费在线观看| 欧美一卡2卡3卡4卡| 精品福利二区三区| 国产午夜亚洲精品不卡| 中文字幕一区二区三区在线不卡| 亚洲天堂免费看| 一区二区理论电影在线观看| 五月婷婷久久丁香| 久久99这里只有精品| 国产精品乡下勾搭老头1| 高清国产午夜精品久久久久久| 顶级嫩模精品视频在线看| 99久久精品国产网站| 在线观看成人小视频| 欧美疯狂做受xxxx富婆| 精品日韩99亚洲| 中文字幕欧美日本乱码一线二线 | 国产精品久久三区| 亚洲精品va在线观看| 日韩在线卡一卡二| 国产福利一区在线| 日本黄色一区二区| 8x8x8国产精品| 国产三级精品视频| 亚洲一区二区综合| 精久久久久久久久久久| av亚洲精华国产精华| 欧美日韩精品免费观看视频| www一区二区| 伊人开心综合网| 极品少妇一区二区| 色哟哟一区二区在线观看| 日韩一级黄色大片| 国产午夜精品福利| 偷拍日韩校园综合在线| 国产成人免费视频网站 | 欧美xingq一区二区| 欧美激情中文字幕一区二区| 亚洲愉拍自拍另类高清精品| 精品系列免费在线观看| 91成人网在线| 精品国产一区二区三区忘忧草 | 麻豆成人综合网| 99re在线视频这里只有精品| 亚洲视频电影在线| 青椒成人免费视频| 91麻豆视频网站| 久久综合国产精品| 午夜欧美在线一二页| 成人激情av网| 久久综合久久久久88| 亚洲一区二区三区爽爽爽爽爽 | 视频一区在线播放| 国产不卡免费视频| 欧美一区二视频| 一区二区三区av电影| 成人一区二区视频| 欧美zozo另类异族| 首页综合国产亚洲丝袜| 99精品久久久久久| 久久精品亚洲乱码伦伦中文| 日韩成人伦理电影在线观看| 91色porny在线视频| 久久久99精品免费观看| 久久电影国产免费久久电影| 欧美福利一区二区| 亚洲成人综合在线| 91蜜桃婷婷狠狠久久综合9色| 久久久精品tv| 国产伦精一区二区三区| 日韩欧美国产一区二区三区| 亚洲国产毛片aaaaa无费看| 91在线观看成人| 中文字幕一区二区三区在线不卡 | 日日夜夜免费精品| 色综合色综合色综合| 国产精品美女久久久久aⅴ | 国产精品情趣视频| 国产另类ts人妖一区二区| 日韩三级精品电影久久久 | 91超碰这里只有精品国产| 亚洲欧美一区二区久久| 99久久婷婷国产综合精品电影 | 欧美激情综合五月色丁香小说| 久久成人久久爱| 精品日韩欧美在线| 国产真实乱偷精品视频免| 日韩欧美电影一区| 日本欧美一区二区| 欧美精品日韩一区| 日本最新不卡在线| 日韩免费电影网站| 久久99精品久久久| 久久精品欧美日韩精品| 丁香六月久久综合狠狠色| 欧美高清一级片在线观看| 高清beeg欧美| 1区2区3区精品视频| 99久久久国产精品| 亚洲综合小说图片| 91精品国产全国免费观看| 日韩av电影天堂| 2023国产精华国产精品| 国产成人精品午夜视频免费| 亚洲欧美一区二区在线观看| 色综合久久久久网| 亚洲一级在线观看| 欧美一区二区人人喊爽| 国内久久精品视频| 国产精品美女久久福利网站| 91丨porny丨中文| 日韩二区三区四区| 国产亚洲午夜高清国产拍精品| 成人在线综合网| 亚洲一二三四在线| 日韩你懂的在线观看| 国产福利不卡视频| 综合精品久久久| 538在线一区二区精品国产| 久草这里只有精品视频| 中文字幕中文字幕一区二区| 欧美在线视频你懂得| 青青青伊人色综合久久| 久久精品视频一区| 欧美在线视频你懂得| 国产在线精品一区二区夜色 | 国产呦萝稀缺另类资源| 亚洲人成在线播放网站岛国| 制服丝袜中文字幕亚洲| 高清日韩电视剧大全免费| 亚洲风情在线资源站| 久久综合久久99| 一本大道久久a久久综合| 免费观看久久久4p| 国产精品网站在线播放| 欧美美女喷水视频| 国产成人超碰人人澡人人澡| 午夜精品123| 国产精品午夜在线观看| 日韩视频在线观看一区二区| 成人激情小说乱人伦| 日韩国产在线观看| 国产精品理论片| 日韩三级在线免费观看| 色先锋aa成人| 岛国一区二区三区| 老司机精品视频导航| 亚洲精品乱码久久久久久久久| 精品国产一区二区三区久久影院| 色婷婷久久久亚洲一区二区三区| 国内精品伊人久久久久影院对白| 亚洲大片一区二区三区| 中文字幕在线一区免费| 久久免费看少妇高潮| 日韩亚洲欧美在线|