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

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

?? spacer.java

?? Web圖形化的Java庫
?? JAVA
字號:
/* ======================================
 * JFreeChart : a free Java chart library
 * ======================================
 *
 * Project Info:  http://www.jfree.org/jfreechart/index.html
 * Project Lead:  David Gilbert (david.gilbert@object-refinery.com);
 *
 * (C) Copyright 2000-2003, by Object Refinery Limited and Contributors.
 *
 * 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., 59 Temple Place, Suite 330,
 * Boston, MA 02111-1307, USA.
 *
 * -----------
 * Spacer.java
 * -----------
 * (C) Copyright 2002, 2003, by Object Refinery Limited.
 *
 * Original Author:  David Gilbert (for Object Refinery Limited);
 * Contributor(s):   -;
 *
 * $Id: Spacer.java,v 1.4 2003/08/20 11:30:11 mungady Exp $
 *
 * Changes
 * -------
 * 07-Feb-2002 : Version 1 (DG);
 * 18-Sep-2002 : Added trim(..) method, completed Javadocs and fixed Checkstyle issues (DG);
 * 26-Mar-2003 : Implemented Serializable (DG);
 *
 */

package org.jfree.chart;

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

/**
 * Represents an amount of blank space inside (or sometimes outside) a
 * rectangle.  This class is similar in function to the Insets class, but
 * allows for the space to be specified in relative terms as well as absolute
 * terms.
 * <P>
 * Instances of this class are immutable.
 *
 * @author David Gilbert
 */
public class Spacer implements Serializable {

    /** A constant for 'relative' spacing. */
    public static final int RELATIVE = 0;

    /** A constant for 'absolute' spacing. */
    public static final int ABSOLUTE = 1;

    /** The spacing type (relative or absolute). */
    private int type;

    /** The space on the left. */
    private double left;

    /** The space on the right. */
    private double right;

    /** The space at the top. */
    private double top;

    /** The space at the bottom. */
    private double bottom;

    /**
     * Creates a new Spacer object.
     * <p>
     * The space can be specified in relative or absolute terms (using the constants
     * <code>RELATIVE</code> and <code>ABSOLUTE</code> for the <code>type</code> argument.
     * For relative spacing, the margins are specified as percentages (of the overall height
     * or width).  For absolute spacing, the margins are specified in points (1/72 inch).
     *
     * @param type  the type of spacing (relative or absolute).
     * @param left  the left margin.
     * @param top  the top margin.
     * @param right  the right margin.
     * @param bottom  the bottom margin.
     */
    public Spacer(int type, double left, double top, double right, double bottom) {

        this.type = type;
        this.left = left;
        this.top = top;
        this.right = right;
        this.bottom = bottom;

    }

    /**
     * Returns the amount of space for the left hand side of a rectangular area.
     * <p>
     * The width argument is only used for calculating 'relative' spacing.
     *
     * @param width  the overall width of the rectangular area.
     *
     * @return  the space (in points).
     */
    public double getLeftSpace(double width) {

        double result = 0.0;

        if (type == ABSOLUTE) {
            result = left;
        }
        else if (type == RELATIVE) {
            result = left * width;
        }

        return result;

    }

    /**
     * Returns the amount of space for the right hand side of a rectangular area.
     * <p>
     * The width argument is only used for calculating 'relative' spacing.
     *
     * @param width  the overall width of the rectangular area.
     *
     * @return  the space (in points).
     */
    public double getRightSpace(double width) {

        double result = 0.0;

        if (type == ABSOLUTE) {
            result = right;
        }
        else if (type == RELATIVE) {
            result = right * width;
        }

        return result;

    }

    /**
     * Returns the amount of space for the top of a rectangular area.
     * <p>
     * The height argument is only used for calculating 'relative' spacing.
     *
     * @param height  the overall height of the rectangular area.
     *
     * @return  the space (in points).
     */
    public double getTopSpace(double height) {

        double result = 0.0;

        if (type == ABSOLUTE) {
            result = top;
        }
        else if (type == RELATIVE) {
            result = top * height;
        }

        return result;

    }

    /**
     * Returns the amount of space for the bottom of a rectangular area.
     * <p>
     * The height argument is only used for calculating 'relative' spacing.
     *
     * @param height  the overall height of the rectangular area.
     *
     * @return  the space (in points).
     */
    public double getBottomSpace(double height) {

        double result = 0.0;

        if (type == ABSOLUTE) {
            result = bottom;
        }
        else if (type == RELATIVE) {
            result = bottom * height;
        }

        return result;

    }

    /**
     * Returns the width after adding the left and right spacing amounts.
     *
     * @param width  the original width.
     *
     * @return the adjusted width.
     */
    public double getAdjustedWidth(double width) {

        double result = width;

        if (type == ABSOLUTE) {
            result = result + left + right;
        }
        else if (type == RELATIVE) {
            result = result + (left * width) + (right * width);
        }

        return result;

    }

    /**
     * Returns the height after adding the top and bottom spacing amounts.
     *
     * @param height  the original height.
     *
     * @return the adjusted height.
     */
    public double getAdjustedHeight(double height) {

        double result = height;

        if (type == ABSOLUTE) {
            result = result + top + bottom;
        }
        else if (type == RELATIVE) {
            result = result + (top * height) + (bottom * height);
        }

        return result;

    }

    /**
     * Calculates the margins and trims them from the supplied area.
     *
     * @param area  the area to be trimmed.
     */
    public void trim(Rectangle2D area) {
        double x = area.getX();
        double y = area.getY();
        double h = area.getHeight();
        double w = area.getWidth();
        double l = getLeftSpace(w);
        double r = getRightSpace(w);
        double t = getTopSpace(h);
        double b = getBottomSpace(h);
        area.setRect(x + l, y + t, w - l - r, h - t - b);
    }

    /**
     * Tests this object for equality with another object.
     *
     * @param obj  the other object.
     *
     * @return <code>true</code> or <code>false</code>.
     */
    public boolean equals(Object obj) {

        if (obj == null) {
            return false;
        }

        if (obj == this) {
            return true;
        }

        if (obj instanceof Spacer) {
            Spacer s = (Spacer) obj;
            boolean b0 = (this.type == s.type);
            boolean b1 = (this.left == s.left);
            boolean b2 = (this.right == s.right);
            boolean b3 = (this.top == s.top);
            boolean b4 = (this.bottom == s.bottom);
            return b0 && b1 && b2 && b3 && b4;
        }

        return false;
    }

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久久久婷婷| 国产日韩一级二级三级| 99视频精品免费视频| 国产福利91精品一区二区三区| 久久99热这里只有精品| 久久国产精品99久久久久久老狼 | 久久午夜电影网| 日韩欧美国产成人一区二区| 欧美大肚乱孕交hd孕妇| 日韩免费高清av| 久久精品一区八戒影视| 国产拍欧美日韩视频二区| 亚洲国产成人一区二区三区| 日韩美女精品在线| 亚洲在线视频网站| 免费在线观看日韩欧美| 国产成人啪免费观看软件 | 亚洲综合一二区| 日韩精品一二区| 精品一区二区三区av| 国产91精品一区二区| 色哟哟在线观看一区二区三区| 欧美色倩网站大全免费| 日韩欧美国产一区二区在线播放 | 日韩综合小视频| 精品一区中文字幕| www.视频一区| 制服视频三区第一页精品| 国产午夜精品理论片a级大结局| 亚洲男人都懂的| 美女视频网站黄色亚洲| 不卡av在线免费观看| 欧美日韩亚洲综合一区二区三区| 欧美成人aa大片| 一区二区视频免费在线观看| 久久99国产精品久久99| 91久久精品国产91性色tv| 日韩三级视频中文字幕| 亚洲色图欧美在线| 国产精品一二三在| 69堂亚洲精品首页| 日韩伦理电影网| 国产自产视频一区二区三区| 欧美午夜一区二区三区| 国产精品毛片大码女人| 精品一区二区三区免费观看| 欧美性xxxxxx少妇| 亚洲日本在线视频观看| 狠狠色丁香久久婷婷综合_中| 欧美日韩中文一区| 18成人在线视频| 国产成人夜色高潮福利影视| 欧美一区二视频| 亚洲最快最全在线视频| 成人午夜精品在线| 337p日本欧洲亚洲大胆精品| 亚洲一区在线视频观看| 色综合久久久久网| 中文字幕亚洲欧美在线不卡| 国产一区二区精品在线观看| 日韩精品一区二区在线观看| 污片在线观看一区二区| 在线观看日韩精品| 亚洲精选视频免费看| 色综合久久66| 亚洲欧美精品午睡沙发| www.99精品| 亚洲视频香蕉人妖| av电影天堂一区二区在线 | 亚洲国产日产av| 色综合久久久久综合体| 有码一区二区三区| 91免费视频观看| 亚洲精品国产无天堂网2021| 日本高清不卡在线观看| 亚洲一区国产视频| 欧美女孩性生活视频| 日韩激情一二三区| 日韩精品综合一本久道在线视频| 美脚の诱脚舐め脚责91| 久久―日本道色综合久久| 成人午夜在线播放| 亚洲久草在线视频| 91精品国产综合久久蜜臀| 久久不见久久见免费视频7| 久久久亚洲欧洲日产国码αv| 国产美女一区二区| 中文字幕在线不卡| 欧美日韩在线免费视频| 人人狠狠综合久久亚洲| 国产欧美日韩中文久久| 94-欧美-setu| 三级一区在线视频先锋| 久久综合久久综合久久| 成人国产精品视频| 亚洲国产成人av好男人在线观看| 日韩美一区二区三区| 波多野洁衣一区| 日韩国产在线一| 国产亚洲欧美激情| 欧美色网一区二区| 国产综合久久久久久久久久久久 | 日本视频在线一区| 中文字幕第一区二区| 欧美日韩一区视频| 国产综合色视频| 亚洲第一搞黄网站| 国产亚洲一区二区三区在线观看 | 欧美一二三区在线| 成人av在线播放网址| 天天射综合影视| 久久日韩粉嫩一区二区三区| 欧美综合天天夜夜久久| 国产福利视频一区二区三区| 亚洲国产wwwccc36天堂| 中文字幕av一区二区三区| 日韩一区二区电影网| 91福利小视频| 9久草视频在线视频精品| 蜜桃久久久久久| 亚洲午夜电影在线观看| 国产精品国产三级国产aⅴ原创 | 日韩免费观看高清完整版 | 日韩精品一区第一页| 国产精品久久精品日日| 精品少妇一区二区三区免费观看| 99精品1区2区| 成人在线视频一区| 韩国毛片一区二区三区| 日韩国产成人精品| 亚洲小说春色综合另类电影| 国产精品成人网| 中文字幕欧美国产| 久久免费的精品国产v∧| 3751色影院一区二区三区| 欧美综合欧美视频| 色欧美88888久久久久久影院| 成人中文字幕在线| 成人午夜电影小说| 国产精品一区二区久激情瑜伽| 美女一区二区视频| 日韩**一区毛片| 日韩高清电影一区| 日韩精品久久理论片| 偷窥国产亚洲免费视频| 亚洲线精品一区二区三区 | 久久久久99精品一区| 欧美成人猛片aaaaaaa| 日韩免费电影网站| 亚洲精品一区在线观看| 26uuu国产电影一区二区| 久久亚洲春色中文字幕久久久| 久久综合九色综合久久久精品综合| 日韩视频在线一区二区| 欧美第一区第二区| wwww国产精品欧美| 国产日韩欧美不卡在线| 亚洲国产高清不卡| 亚洲免费观看在线视频| 亚洲123区在线观看| 婷婷一区二区三区| 免费av网站大全久久| 精品一区二区三区影院在线午夜| 国内精品国产成人国产三级粉色 | 不卡一区二区三区四区| 99精品视频免费在线观看| 在线观看视频一区二区| 91精品在线免费| 久久先锋影音av鲁色资源| 国产精品无码永久免费888| 中文字幕字幕中文在线中不卡视频| 亚洲欧美综合另类在线卡通| 亚洲综合成人在线视频| 日本不卡1234视频| 成人性生交大片免费看视频在线| 色婷婷av一区二区| 日韩欧美高清一区| 国产精品毛片久久久久久久| 一区二区三区四区激情| 麻豆精品国产传媒mv男同| 成人免费福利片| 在线免费观看成人短视频| 日韩一级二级三级| 中文字幕一区二区三区四区不卡 | 成人免费av网站| 欧美日韩国产大片| 欧美电影免费提供在线观看| 国产精品久久久久久久久免费桃花| 亚洲成人午夜影院| 成人永久免费视频| 欧美一区二区三区不卡| 中文字幕一区日韩精品欧美| 丁香亚洲综合激情啪啪综合| 色又黄又爽网站www久久| 日韩三级精品电影久久久 | 国产成人在线视频网站| 欧美日韩国产综合视频在线观看| 国产欧美日韩在线观看| 日本不卡一区二区三区| 日本精品免费观看高清观看|