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

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

?? flowarrangement.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.]
 *
 * --------------------
 * FlowArrangement.java
 * --------------------
 * (C) Copyright 2004, 2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: FlowArrangement.java,v 1.13.2.1 2005/10/25 20:39:38 mungady Exp $
 *
 * Changes:
 * --------
 * 22-Oct-2004 : Version 1 (DG);
 * 04-Feb-2005 : Implemented equals() and made serializable (DG);
 * 08-Feb-2005 : Updated for changes in RectangleConstraint (DG);
 * 
 */

package org.jfree.chart.block;

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

import org.jfree.ui.HorizontalAlignment;
import org.jfree.ui.Size2D;
import org.jfree.ui.VerticalAlignment;

/**
 * Arranges blocks in a flow layout.  This class is immutable.
 */
public class FlowArrangement implements Arrangement, Serializable {

    /** For serialization. */
    private static final long serialVersionUID = 4543632485478613800L;
    
    /** The horizontal alignment of blocks. */
    private HorizontalAlignment horizontalAlignment;
    
    /** The vertical alignment of blocks within each row. */
    private VerticalAlignment verticalAlignment;
    
    /** The horizontal gap between items within rows. */
    private double horizontalGap;
    
    /** The vertical gap between rows. */
    private double verticalGap;
    
    /**
     * Creates a new instance.
     */
    public FlowArrangement() {   
        this(HorizontalAlignment.CENTER, VerticalAlignment.CENTER, 2.0, 2.0);
    }
     
    /**
     * Creates a new instance.
     * 
     * @param hAlign  the horizontal alignment (currently ignored).
     * @param vAlign  the vertical alignment (currently ignored).
     * @param hGap  the horizontal gap.
     * @param vGap  the vertical gap.
     */
    public FlowArrangement(HorizontalAlignment hAlign, VerticalAlignment vAlign,
                           double hGap, double vGap) {   
        this.horizontalAlignment = hAlign;
        this.verticalAlignment = vAlign;
        this.horizontalGap = hGap;
        this.verticalGap = vGap;
    }
    
    /**
     * 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 constraint  the size constraint.
     * @param g2  the graphics device.
     * 
     * @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) {
                return arrangeNF(container, g2, constraint);  
            }
            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) {
                return arrangeFF(container, g2, constraint);  
            }
            else if (h == LengthConstraintType.RANGE) {
                return arrangeFR(container, g2, constraint);  
            }
        }
        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 RuntimeException("Unrecognised constraint type.");
        
    }

    /**
     * Arranges the blocks in the container with a fixed width and no height 
     * constraint.
     * 
     * @param container  the container.
     * @param constraint  the constraint.
     * @param g2  the graphics device.
     * 
     * @return The size.
     */
    protected Size2D arrangeFN(BlockContainer container, Graphics2D g2,
                               RectangleConstraint constraint) {
        
        List blocks = container.getBlocks();
        double width = constraint.getWidth();
        
        double x = 0.0;
        double y = 0.0;
        double maxHeight = 0.0;
        List itemsInRow = new ArrayList();
        for (int i = 0; i < blocks.size(); i++) {
            Block block = (Block) blocks.get(i);
            Size2D size = block.arrange(g2, RectangleConstraint.NONE);
            if (x + size.width <= width) {
                itemsInRow.add(block);
                block.setBounds(
                    new Rectangle2D.Double(x, y, size.width, size.height)
                );
                x = x + size.width + this.horizontalGap;
                maxHeight = Math.max(maxHeight, size.height);
            }
            else {
                if (itemsInRow.isEmpty()) {
                    // place in this row (truncated) anyway
                    block.setBounds(
                        new Rectangle2D.Double(
                            x, y, Math.min(size.width, width - x), size.height
                        )
                    );
                    x = 0.0;
                    y = y + size.height + this.verticalGap;
                }
                else {
                    // start new row
                    itemsInRow.clear();
                    x = 0.0;
                    y = y + maxHeight + this.verticalGap;
                    maxHeight = size.height;
                    block.setBounds(
                        new Rectangle2D.Double(
                            x, y, Math.min(size.width, width), size.height
                        )
                    );
                    x = size.width + this.horizontalGap;
                    itemsInRow.add(block);
                }
            }
        }
        return new Size2D(constraint.getWidth(), y + maxHeight);  

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
色婷婷国产精品综合在线观看| 成人av在线电影| 亚洲一区在线观看免费 | 欧美日韩视频在线观看一区二区三区 | 欧美一区二区三区色| 91视频免费播放| 91丨porny丨首页| 91蝌蚪porny成人天涯| 99v久久综合狠狠综合久久| 床上的激情91.| 成人成人成人在线视频| 色婷婷综合中文久久一本| 91免费国产在线| 欧美午夜一区二区三区免费大片| 欧美日韩aaaaaa| 欧美大胆人体bbbb| 久久久久久久久久久久久女国产乱| 亚洲精品一区二区三区蜜桃下载 | 亚洲人成精品久久久久| 亚洲人妖av一区二区| 一区二区三区在线视频播放| 亚洲成人av电影在线| 日本不卡一区二区三区高清视频| 另类欧美日韩国产在线| 国产成人综合亚洲91猫咪| 成人精品鲁一区一区二区| 在线观看国产一区二区| 欧美一级国产精品| 欧美激情在线看| 视频一区二区三区中文字幕| 国产又黄又大久久| 色噜噜狠狠成人网p站| 91精品国产综合久久香蕉的特点| 久久亚洲精精品中文字幕早川悠里| 国产精品久久免费看| 午夜精品久久久久久久| 国产精品亚洲午夜一区二区三区| 91美女福利视频| 日韩一本二本av| 综合久久给合久久狠狠狠97色 | 国产原创一区二区三区| 日本韩国一区二区| 久久免费精品国产久精品久久久久| 亚洲精品成a人| 国产综合成人久久大片91| 日本乱人伦一区| 午夜精品福利在线| 国v精品久久久网| 日韩一级免费观看| 亚洲欧美日韩一区二区 | 国产精品久久久久久久久免费樱桃 | 成人开心网精品视频| 欧美精品xxxxbbbb| 亚洲欧美日韩中文播放| 粉嫩一区二区三区在线看| 5月丁香婷婷综合| 亚洲精品欧美二区三区中文字幕| 久久97超碰色| 制服丝袜日韩国产| 亚洲精品成a人| 91在线观看成人| 国产精品天干天干在线综合| 国产自产视频一区二区三区| 日韩三级在线免费观看| 亚洲一级二级三级在线免费观看| 成人黄色在线网站| 欧美精彩视频一区二区三区| 国内精品视频一区二区三区八戒| 欧美精品777| 亚洲成人你懂的| 欧美日韩一级片在线观看| 亚洲人成网站在线| 91久久久免费一区二区| 一区二区三区在线看| 日本国产一区二区| 亚洲美女少妇撒尿| 日本黄色一区二区| 亚洲一区二区欧美日韩| 欧美日韩极品在线观看一区| 午夜电影网一区| 91精品国产欧美一区二区| 五月天亚洲婷婷| 日韩一区二区在线看| 美女一区二区三区在线观看| 91精品国产免费久久综合| 蜜桃视频一区二区三区 | 国产乱子伦一区二区三区国色天香| 欧美一区二区日韩一区二区| 日本在线播放一区二区三区| 日韩丝袜情趣美女图片| 美女视频黄 久久| 久久九九影视网| 成人动漫一区二区在线| 亚洲精品日日夜夜| 欧美人与禽zozo性伦| 蜜桃一区二区三区四区| 欧美极品美女视频| 色综合一区二区| 日本亚洲天堂网| 久久综合给合久久狠狠狠97色69| 成人精品一区二区三区四区| 一区二区免费看| 欧美成人一级视频| 91丨porny丨首页| 日产精品久久久久久久性色| 亚洲国产成人一区二区三区| 色88888久久久久久影院野外| 美腿丝袜一区二区三区| 国产精品理论在线观看| 精品视频123区在线观看| 国产麻豆日韩欧美久久| 一区二区三区四区国产精品| 日韩欧美不卡在线观看视频| 99精品视频一区二区三区| 亚洲成人动漫av| 中文字幕制服丝袜一区二区三区| 欧美日韩国产综合视频在线观看 | 亚洲二区在线视频| 久久免费视频一区| 欧美日本一区二区| 成人av免费观看| 久久 天天综合| 亚洲大型综合色站| 亚洲欧美偷拍卡通变态| 久久亚洲欧美国产精品乐播| 欧美日韩精品电影| 91毛片在线观看| 成人视屏免费看| 国产一区二区三区黄视频 | 亚洲精品国产一区二区精华液 | 视频在线观看国产精品| 国产精品久久久久影院亚瑟| 亚洲精品国产一区二区精华液 | 国产成人精品影院| 麻豆91小视频| 午夜影视日本亚洲欧洲精品| 综合激情成人伊人| 日本一区二区综合亚洲| 日韩色视频在线观看| 717成人午夜免费福利电影| 一本一道久久a久久精品| 国产不卡在线播放| 国产一区二区三区日韩| 日韩在线观看一区二区| 亚洲一区二区三区视频在线播放| 亚洲欧洲性图库| 欧美国产亚洲另类动漫| 国产免费久久精品| 国产欧美精品日韩区二区麻豆天美| 亚洲精品一区二区三区在线观看| 欧美电视剧免费观看| 精品久久久久一区二区国产| 精品999在线播放| www久久精品| 国产日韩欧美在线一区| 国产精品人成在线观看免费| 国产精品嫩草影院av蜜臀| 中文字幕第一区综合| 亚洲视频免费看| 亚洲精品国产一区二区精华液| 亚洲综合在线五月| 性感美女久久精品| 亚洲午夜在线视频| 肉丝袜脚交视频一区二区| 日本中文一区二区三区| 国产一区在线不卡| 国产99久久精品| 中文字幕在线播放不卡一区| 最新中文字幕一区二区三区 | 欧美精品一区二区三| www久久精品| 国产精品丝袜91| 亚洲午夜国产一区99re久久| 日韩不卡在线观看日韩不卡视频| 日韩av在线播放中文字幕| 国产一区二区福利| 99re成人在线| 91精品国产综合久久福利软件| 欧美变态tickling挠脚心| 国产日产精品1区| 亚洲国产毛片aaaaa无费看| 精品一二三四区| 99精品视频在线免费观看| 欧美一区二区性放荡片| 欧美国产禁国产网站cc| 亚洲综合无码一区二区| 看电视剧不卡顿的网站| 波波电影院一区二区三区| 欧美乱熟臀69xxxxxx| 中文一区二区在线观看| 婷婷久久综合九色国产成人| 国产麻豆91精品| 欧美理论在线播放| 国产精品毛片无遮挡高清| 色综合久久九月婷婷色综合| 精品国产伦一区二区三区观看方式| 中文字幕永久在线不卡| 久久电影国产免费久久电影| 色噜噜狠狠成人中文综合| 久久久久久毛片|