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

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

?? rectangleconstraint.java

?? jfreechart1.0.1 jsp繪制圖表的開發(fā)包
?? 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.]
 *
 * ------------------------
 * RectangleConstraint.java
 * ------------------------
 * (C) Copyright 2004, 2005, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: RectangleConstraint.java,v 1.5.2.1 2005/10/25 20:39:38 mungady Exp $
 *
 * Changes:
 * --------
 * 22-Oct-2004 : Version 1 (DG);
 * 02-Feb-2005 : Added toString() method (DG);
 * 08-Feb-2005 : Separated height and width constraints (DG);
 * 13-May-2005 : Added convenience constructor and new methods for 
 *               transforming constraints (DG);
 * 
 */

package org.jfree.chart.block;

import org.jfree.data.Range;
import org.jfree.ui.Size2D;

/**
 * A description of a constraint for resizing a rectangle.  Constraints are
 * immutable.
 */
public class RectangleConstraint {

    /**
     * An instance representing no constraint. 
     */
    public static final RectangleConstraint NONE = new RectangleConstraint(
        0.0, null, LengthConstraintType.NONE, 
        0.0, null, LengthConstraintType.NONE
    );
    
    /** The width. */
    private double width;
    
    /** The width range. */
    private Range widthRange;
    
    /** The width constraint type. */
    private LengthConstraintType widthConstraintType;
    
    /** The fixed or maximum height. */
    private double height;
    
    private Range heightRange;
    
    /** The constraint type. */
    private LengthConstraintType heightConstraintType;
    
    /**
     * Creates a new "fixed width and height" instance.
     * 
     * @param w  the fixed width.
     * @param h  the fixed height.
     */
    public RectangleConstraint(double w, double h) {
        this(
            w, null, LengthConstraintType.FIXED, 
            h, null, LengthConstraintType.FIXED
        );  
    }
    
    /**
     * Creates a new "range width and height" instance.
     * 
     * @param w  the width range.
     * @param h  the height range.
     */
    public RectangleConstraint(Range w, Range h) {
        this(
            0.0, w, LengthConstraintType.RANGE, 
            0.0, h, LengthConstraintType.RANGE
        );   
    }
    
    /**
     * Creates a new constraint with a range for the width and a
     * fixed height.
     * 
     * @param w  the width range.
     * @param h  the fixed height.
     */
    public RectangleConstraint(Range w, double h) {
        this(
            0.0, w, LengthConstraintType.RANGE, 
            h, null, LengthConstraintType.FIXED
        );   
    }
    
    /**
     * Creates a new constraint with a fixed width and a range for
     * the height.
     * 
     * @param w  the fixed width.
     * @param h  the height range.
     */
    public RectangleConstraint(double w, Range h) {
        this(
            w, null, LengthConstraintType.FIXED, 
            0.0, h, LengthConstraintType.RANGE
        );   
    }

    /**
     * Creates a new constraint.
     * 
     * @param w  the fixed or maximum width.
     * @param widthRange  the width range.
     * @param widthConstraintType  the width type.
     * @param h  the fixed or maximum height.
     * @param heightRange  the height range.
     * @param heightConstraintType  the height type.
     */
    public RectangleConstraint(double w, Range widthRange, 
                               LengthConstraintType widthConstraintType,
                               double h, Range heightRange, 
                               LengthConstraintType heightConstraintType) {
        if (widthConstraintType == null) {
            throw new IllegalArgumentException("Null 'widthType' argument.");
        }
        if (heightConstraintType == null) {
            throw new IllegalArgumentException("Null 'heightType' argument."); 
        }
        this.width = w;
        this.widthRange = widthRange;
        this.widthConstraintType = widthConstraintType;
        this.height = h;
        this.heightRange = heightRange;
        this.heightConstraintType = heightConstraintType;
    }
    
    /**
     * Returns the fixed width.
     * 
     * @return The width.
     */
    public double getWidth() {
        return this.width;
    }
    
    /**
     * Returns the width range.
     * 
     * @return The range (possibly <code>null</code>).
     */
    public Range getWidthRange() {
        return this.widthRange;   
    }
    
    /**
     * Returns the constraint type.
     * 
     * @return The constraint type (never <code>null</code>).
     */
    public LengthConstraintType getWidthConstraintType() {
        return this.widthConstraintType;
    }
    
    /**
     * Returns the fixed height.
     * 
     * @return The height.
     */
    public double getHeight() {
        return this.height;
    }
    
    /**
     * Returns the width range.
     * 
     * @return The range (possibly <code>null</code>).
     */
    public Range getHeightRange() {
        return this.heightRange;   
    }
    
    /**
     * Returns the constraint type.
     * 
     * @return The constraint type (never <code>null</code>).
     */
    public LengthConstraintType getHeightConstraintType() {
        return this.heightConstraintType;
    }
    
    /**
     * Returns a constraint that matches this one on the height attributes,
     * but has no width constraint.
     * 
     * @return A new constraint.
     */
    public RectangleConstraint toUnconstrainedWidth() {
        if (this.widthConstraintType == LengthConstraintType.NONE) {
            return this;   
        }
        else {
            return new RectangleConstraint(
                this.width, this.widthRange, LengthConstraintType.NONE,
                this.height, this.heightRange, this.heightConstraintType
            );
        }
    }
    
    /**
     * Returns a constraint that matches this one on the width attributes,
     * but has no height constraint.
     * 
     * @return A new constraint.
     */
    public RectangleConstraint toUnconstrainedHeight() {
        if (this.heightConstraintType == LengthConstraintType.NONE) {
            return this;   
        }
        else {
            return new RectangleConstraint(
                this.width, this.widthRange, this.widthConstraintType,
                0.0, this.heightRange, LengthConstraintType.NONE
            );
        }
    }
    
    /**
     * Returns a constraint that matches this one on the height attributes,
     * but has a fixed width constraint.
     * 
     * @param width  the fixed width.
     * 
     * @return A new constraint.
     */
    public RectangleConstraint toFixedWidth(double width) {
        return new RectangleConstraint(
            width, this.widthRange, LengthConstraintType.FIXED,
            this.height, this.heightRange, this.heightConstraintType
        );
    }
    
    /**
     * Returns a constraint that matches this one on the width attributes,
     * but has a fixed height constraint.
     * 
     * @param height  the fixed height.
     * 
     * @return A new constraint.
     */
    public RectangleConstraint toFixedHeight(double height) {
        return new RectangleConstraint(
            this.width, this.widthRange, this.widthConstraintType,
            height, this.heightRange, LengthConstraintType.FIXED
        );
    }
    
    /**
     * Returns a constraint that matches this one on the height attributes,
     * but has a range width constraint.
     * 
     * @param range  the width range (<code>null</code> not permitted).
     * 
     * @return A new constraint.
     */
    public RectangleConstraint toRangeWidth(Range range) {
        if (range == null) {
            throw new IllegalArgumentException("Null 'range' argument.");   
        }
        return new RectangleConstraint(
            range.getUpperBound(), range, LengthConstraintType.RANGE,
            this.height, this.heightRange, this.heightConstraintType
        );
    }
    
    /**
     * Returns a constraint that matches this one on the width attributes,
     * but has a range height constraint.
     * 
     * @param range  the height range (<code>null</code> not permitted).
     * 
     * @return A new constraint.
     */
    public RectangleConstraint toRangeHeight(Range range) {
        if (range == null) {
            throw new IllegalArgumentException("Null 'range' argument.");   
        }
        return new RectangleConstraint(
            this.width, this.widthRange, this.widthConstraintType,
            range.getUpperBound(), range, LengthConstraintType.RANGE
        );
    }
    
    /**
     * Returns a string representation of this instance, mostly used for
     * debugging purposes.
     * 
     * @return A string.
     */
    public String toString() {
        return "RectangleConstraint[" 
            + this.widthConstraintType.toString() + ": width=" 
            + this.width + ", height=" + this.height + "]";   
    }
    
    /**
     * Returns the new size that reflects the constraints defined by this 
     * instance.
     * 
     * @param base  the base size.
     * 
     * @return The constrained size.
     */
    public Size2D calculateConstrainedSize(Size2D base) {
        Size2D result = new Size2D();
        if (this.widthConstraintType == LengthConstraintType.NONE) {
            result.width = base.width;
            if (this.heightConstraintType == LengthConstraintType.NONE) {
               result.height = base.height;
            }
            else if (this.heightConstraintType == LengthConstraintType.RANGE) {
               result.height = this.heightRange.constrain(base.height);
            }
            else if (this.heightConstraintType == LengthConstraintType.FIXED) {
               result.height = this.height;
            }
        }
        else if (this.widthConstraintType == LengthConstraintType.RANGE) {
            result.width = this.widthRange.constrain(base.width);
            if (this.heightConstraintType == LengthConstraintType.NONE) {
                result.height = base.height;
            }
            else if (this.heightConstraintType == LengthConstraintType.RANGE) {
                result.height = this.heightRange.constrain(base.height);
            }
            else if (this.heightConstraintType == LengthConstraintType.FIXED) {
                result.height = this.height;
            }
        }
        else if (this.widthConstraintType == LengthConstraintType.FIXED) {
            result.width = this.width;
            if (this.heightConstraintType == LengthConstraintType.NONE) {
                result.height = base.height;
            }
            else if (this.heightConstraintType == LengthConstraintType.RANGE) {
                result.height = this.heightRange.constrain(base.height);
            }
            else if (this.heightConstraintType == LengthConstraintType.FIXED) {
                result.height = this.height;
            }
        }
        return result;
    }
    
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲图片欧美综合| 日韩欧美综合在线| 中文字幕亚洲在| 国产精品自拍网站| 国产色婷婷亚洲99精品小说| 成人app在线观看| 亚洲少妇最新在线视频| 色哟哟国产精品免费观看| 亚洲图片欧美视频| 日韩一区二区免费在线观看| 国产一区美女在线| 亚洲欧美怡红院| 欧美亚洲一区二区在线观看| 国产成人免费av在线| 久久久久久99久久久精品网站| 国产精品一区二区久久不卡| 成人免费在线观看入口| 欧美日韩在线三级| 国产麻豆午夜三级精品| 一区二区中文视频| 91麻豆精品久久久久蜜臀| 国产在线不卡视频| 一区二区成人在线| 欧美成人精品二区三区99精品| 粗大黑人巨茎大战欧美成人| 亚洲国产成人高清精品| 久久九九久久九九| 欧美亚一区二区| 国模娜娜一区二区三区| 一区二区高清免费观看影视大全| 日韩视频免费直播| aaa亚洲精品| 麻豆91精品91久久久的内涵| 国产精品色呦呦| 6080日韩午夜伦伦午夜伦| 国产iv一区二区三区| 天堂资源在线中文精品| 国产精品久久久久久亚洲毛片| 欧美顶级少妇做爰| 91一区二区在线观看| 久久精品国产亚洲一区二区三区| **欧美大码日韩| 精品国产乱码久久久久久老虎 | 久久久99久久精品欧美| 色综合久久天天| 黑人精品欧美一区二区蜜桃| 亚洲线精品一区二区三区八戒| 国产亚洲精品bt天堂精选| 欧美日韩一区二区电影| 成人黄色av电影| 捆绑调教美女网站视频一区| 亚洲一区在线视频观看| 国产精品精品国产色婷婷| 日韩你懂的在线播放| 欧美性色黄大片手机版| 不卡在线观看av| 国产一区在线不卡| 美女网站视频久久| 婷婷夜色潮精品综合在线| 亚洲视频小说图片| 国产三级欧美三级日产三级99| 91精品国产入口| 欧美亚洲一区三区| 91久久久免费一区二区| 成人午夜大片免费观看| 国产精品亚洲а∨天堂免在线| 日韩av一区二区三区四区| 亚洲成人一区在线| 亚洲一区二区三区中文字幕在线| 中文字幕一区二区日韩精品绯色| 久久日韩粉嫩一区二区三区| 欧美大肚乱孕交hd孕妇| 欧美一区日韩一区| 91精品国产高清一区二区三区蜜臀| 日本高清不卡一区| 色婷婷亚洲婷婷| 91看片淫黄大片一级| 一本久久精品一区二区| 99精品视频一区二区三区| 成人av中文字幕| 99久久婷婷国产| 91精品婷婷国产综合久久竹菊| 91精品1区2区| 欧美一a一片一级一片| 欧美精品国产精品| 欧美一级高清大全免费观看| 欧美一区二区视频网站| 日韩欧美国产一区二区三区| 精品久久久久久综合日本欧美| 26uuu精品一区二区| 久久男人中文字幕资源站| 国产欧美一二三区| 国产精品第13页| 亚洲国产一区二区视频| 日本不卡视频在线| 国产一区999| 99久久免费视频.com| 在线观看亚洲精品视频| 在线91免费看| 久久色视频免费观看| 中文字幕欧美激情一区| 亚洲另类在线制服丝袜| 日韩av中文在线观看| 国产成人高清在线| 色婷婷综合久久久中文一区二区| 欧美日韩成人在线一区| ww亚洲ww在线观看国产| 中文字幕巨乱亚洲| 亚州成人在线电影| 精品一区二区三区免费毛片爱 | 秋霞国产午夜精品免费视频| 精品午夜久久福利影院| 播五月开心婷婷综合| 欧美日韩免费电影| 国产三级一区二区| 亚洲高清免费在线| 国产又黄又大久久| 在线一区二区三区四区五区| 日韩美女在线视频 | 99re这里只有精品首页| 欧美日韩不卡一区二区| 久久九九全国免费| 偷偷要91色婷婷| 国产成人精品免费| 欧美一区二区三区日韩| 免费日韩伦理电影| 国产精品亚洲午夜一区二区三区 | 亚洲成人综合在线| 福利一区二区在线| 91精品国产91久久久久久一区二区 | 国产精品久久久一区麻豆最新章节| 亚洲黄色免费网站| 国产成人精品在线看| 欧美一级片在线观看| 日韩理论片一区二区| 国产精品一区专区| 91精品欧美综合在线观看最新 | 精品一区二区三区影院在线午夜| 色婷婷激情一区二区三区| 久久精品人人做人人综合| 婷婷成人综合网| 色综合av在线| 中文成人av在线| 久久精品久久久精品美女| 在线一区二区三区做爰视频网站| 国产清纯白嫩初高生在线观看91 | 亚洲国产日韩a在线播放性色| 国产精品77777| 欧美一区二区三区影视| 亚洲免费观看视频| 成人一级视频在线观看| 欧美mv日韩mv国产网站app| 天天影视涩香欲综合网| 欧美色区777第一页| 一区二区三区电影在线播| 成人av手机在线观看| 国产欧美一区二区在线观看| 久久99最新地址| 91.xcao| 视频一区二区欧美| 91精品国产aⅴ一区二区| 视频一区在线视频| 91麻豆精品91久久久久同性| 天堂一区二区在线| 欧美一区二区视频观看视频| 日本欧美一区二区三区乱码| 久久久精品2019中文字幕之3| 精品一区二区影视| 久久午夜老司机| 国产成人aaa| 中文字幕中文字幕一区| 99视频在线精品| 亚洲美女淫视频| 在线一区二区观看| 亚洲成人激情社区| 欧美一二三在线| 麻豆精品一区二区av白丝在线| 欧美一级xxx| 国产乱子伦一区二区三区国色天香| 久久久久国产精品麻豆| 成人18视频在线播放| 亚洲欧洲性图库| 在线精品视频免费观看| 日日摸夜夜添夜夜添国产精品| 3d成人h动漫网站入口| 久久成人18免费观看| 久久久久国产免费免费| 99免费精品在线| 亚洲一区二区视频在线| 欧美一级高清片| 岛国精品在线播放| 亚洲一区视频在线观看视频| 91精品国产欧美日韩| 国产制服丝袜一区| 亚洲精品免费电影| 日韩三级中文字幕| 成人av资源在线| 日韩在线a电影| 精品处破学生在线二十三| 成人福利视频网站|