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

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

?? spring.java

?? linux下建立JAVA虛擬機的源碼KAFFE
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/* Spring.java --    Copyright (C) 2004 Free Software Foundation, Inc.This file is part of GNU Classpath.GNU Classpath is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2, or (at your option)any later version.GNU Classpath is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with GNU Classpath; see the file COPYING.  If not, write to theFree Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA02110-1301 USA.Linking this library statically or dynamically with other modules ismaking a combined work based on this library.  Thus, the terms andconditions of the GNU General Public License cover the wholecombination.As a special exception, the copyright holders of this library give youpermission to link this library with independent modules to produce anexecutable, regardless of the license terms of these independentmodules, and to copy and distribute the resulting executable underterms of your choice, provided that you also meet, for each linkedindependent module, the terms and conditions of the license of thatmodule.  An independent module is a module which is not derived fromor based on this library.  If you modify this library, you may extendthis exception to your version of the library, but you are notobligated to do so.  If you do not wish to do so, delete thisexception statement from your version. */package javax.swing;import java.awt.Component;import java.awt.Dimension;/** * Calculates the space between component edges, that are layed out by * {@link SpringLayout}. * <p> * A Spring defines a minimum, preferred and maximum distance for each edge * (north, east, south, west) of a component. * </p> * However, springs are not static, their actual values are computed at * runtime. That means, if a Spring C is defined as the sum of Spring A and * Spring B, then the values (min, pref and max) are not calculated at * creation of Spring C, but instead always when {@link #getValue} is * called. So, when Spring A or Spring B changes, this is reflected in * Spring C. * * @author Roman Kennke (roman@ontographics.com) */public abstract class Spring{  /** Indicates a not-set value. **/  public static final int UNSET = Integer.MIN_VALUE;  /**   * Creates a new Spring object. This constructor is used by the static   * methods which create Springs.   */  protected Spring()  {    // Nothing to do here.  }  /**   * Creates a Spring which min, pref and max values are all the same.   * These kind of Springs are 'struts'.   *   * @param val the constant for min, pref and max values.   * @return a Spring object with constant values for min, pref and max.   */  public static Spring constant(int val)  {    return new SimpleSpring(val, val, val);  }  /** Creates a Spring which min, pref and max values are constants.   * @param min the constant for the minimum value.   * @param pref the constant for the preferred value.   * @param max the constant for the maximum value.   * @return a Spring object with constant values for min, pref and max.   */  public static Spring constant(int min, int pref, int max)  {    return new SimpleSpring(min, pref, max);  }  /**   * Returns the maximum value of the Spring.   *   * @return the maximum value.   */  public abstract int getMaximumValue();  /**   * Returns the minimum value of this Spring.   *   * @return the minimum value.   */  public abstract int getMinimumValue();  /**   * Return the preferred value of this Spring.   *   * @return the preferred value.   */  public abstract int getPreferredValue();  /**   * Return the actual value of this Spring.   *   * @return the actual value of this Spring.   */  public abstract int getValue();  /**   * Creates and returns a Spring, which always has the maximum values   * min = max(min_s1, min_s2), pref = max(pref_s1, pref_s2), max =   * max(max_s1, max_s2).   *   * @param s1 the first summand of the max Spring.   * @param s2 the second summand of the max Spring.   * @return a Spring which is max(s1, s2).   */  public static Spring max(Spring s1, Spring s2)  {    return new MaxSpring(s1, s2);  }  /**   * Creates and returns a Spring, which is always the negation of s.   * min = -min_s, pref = -pref_s, max = -max_pref.   *   * @param s the Spring to be negated.   * @return the negative of <code>s</code>.   */  public static Spring minus(Spring s)  {    return new MinusSpring(s);  }  /**   * Sets the actual value. If <code>value</code> is out of the (min, max)   * bounds, then the value is adjusted, so that is inside these bounds.   *   * @param value the value to be set.   */  public abstract void setValue(int value);  private int getShrinkRange()   {    return (getPreferredValue() - getMinimumValue());  }  private int getExpandRange()   {    return (getMaximumValue() - getPreferredValue());  }  double getStrain()  {    int v = getValue();    int p = getPreferredValue();    int r = (v < p) ? getShrinkRange() : getExpandRange();    if (r == 0)      r = 1;    return (double)(v - p) / r;  }  void setStrain(double strain)   {    int r = (strain < 0) ? getShrinkRange() : getExpandRange();    int v = (getPreferredValue() + (int)(strain * r));    setValue(v);  }  /**   * Creates and returns a Spring, which is always the sum of s1 and s2.   * min_sum = min_s1 + min_s2, pref_sum = pref_s1 + pref_s2, max_sum =   * max_s1 + max_s2.   *   * @param s1 the 1st summand of the sum Spring.   * @param s2 the 2nd summand of the sum Spring.   * @return a sum which is <code>s1 + s2</code>.   */  public static Spring sum(Spring s1, Spring s2)  {    return new AddSpring(s1, s2);  }  /**   * Return a new Spring which computes its values by scaling   * the values of another spring by a constant factor.  If the   * factor is negative, the minimum and maximum values of   * the argument spring will be interchanged.   * @param spring the spring to track   * @param factor the factor by which to scale   * @return a new multiplicative Spring   * @since 1.5   */  public static Spring scale(final Spring spring, final float factor)  {    if (spring == null)      throw new NullPointerException("spring argument is null");    return new Spring()    {      public int getMaximumValue()      {        return (int) ((factor < 0 ? spring.getMinimumValue()                            : spring.getMaximumValue())                      * factor);      }      public int getMinimumValue()      {        return (int) ((factor < 0 ? spring.getMaximumValue()                                  : spring.getMinimumValue())                            * factor);      }      public int getPreferredValue()      {        return (int) (spring.getPreferredValue() * factor);      }      public int getValue()      {        return (int) (spring.getValue() * factor);      }      public void setValue(int value)      {        spring.setValue((int) (value / factor));      }    };  }  /**   * Return a new Spring which takes its values from the specified   * Component.  In particular, the maximum value is taken from   * the maximumSize, the minimum value is taken from the minimumSize,   * the preferred value is taken from the preferredSize, and the   * value is taken from the component's current size.  These values   * change as the component changes size.   * @param component the component   * @return a new Spring which tracks the component's width   * @since 1.5   */  public static Spring width(final Component component)  {    return new Spring()    {      public int getMaximumValue()      {        return component.getMaximumSize().width;      }      public int getMinimumValue()      {        return component.getMinimumSize().width;      }      public int getPreferredValue()      {        return component.getPreferredSize().width;      }      public int getValue()      {        return component.getSize().width;      }      public void setValue(int value)      {        Dimension d = component.getSize();        component.setSize(value, d.height);      }    };  }  /**   * Return a new Spring which takes its values from the specified   * Component.  In particular, the maximum value is taken from   * the maximumSize, the minimum value is taken from the minimumSize,   * the preferred value is taken from the preferredSize, and the   * value is taken from the component's current size.  These values   * change as the component changes size.   * @param component the component   * @return a new Spring which tracks the component's height   * @since 1.5   */  public static Spring height(final Component component)  {    return new Spring()    {      public int getMaximumValue()      {        return component.getMaximumSize().height;      }      public int getMinimumValue()      {        return component.getMinimumSize().height;      }      public int getPreferredValue()      {        return component.getPreferredSize().height;      }      public int getValue()      {        return component.getSize().height;      }      public void setValue(int value)      {        Dimension d = component.getSize();        component.setSize(d.width, value);      }    };  }  /**   * A simple Spring, that holds constant values for min, pref and max.   *   * @author Roman Kennke (roman@ontographics.com)   */  private static final class SimpleSpring extends Spring  {    /** The constant value for min. */    private final int min;    /** The constant value for pref. */    private final int pref;    /** The constant value for max. */    private final int max;    /** The actual value of the spring. */    private int value;    public String toString()    {      return "SimpleSpring of " + value;    }    /**     * Creates a new SimpleSpring object.     *     * @param newMin the constant minimum value.     * @param newPref the constant preferred value.     * @param newMax the constant maximum value.     */    public SimpleSpring(int newMin, int newPref, int newMax)    {      min = newMin;      pref = newPref;      max = newMax;      value = newPref;    }    /**

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品久久久久av影院| 欧美三级乱人伦电影| 一区二区三区欧美亚洲| 2020日本不卡一区二区视频| 色综合欧美在线| 国产精品12区| 日本系列欧美系列| 一片黄亚洲嫩模| 国产精品网曝门| 欧美不卡一二三| 91麻豆精品国产91久久久资源速度| 成人福利视频网站| 免费成人av在线| 亚洲一区二区三区影院| 国产精品初高中害羞小美女文| 日日夜夜一区二区| 18欧美乱大交hd1984| 久久免费电影网| 日韩欧美二区三区| 3d动漫精品啪啪一区二区竹菊| 91丨九色丨蝌蚪富婆spa| 韩国理伦片一区二区三区在线播放| 天天亚洲美女在线视频| 亚洲一区二区偷拍精品| 综合色中文字幕| 国产精品色婷婷久久58| 国产片一区二区| 久久久99精品久久| 久久久国产精华| 精品播放一区二区| 亚洲精品一线二线三线| 精品国内片67194| 日韩欧美国产电影| 欧美成人精精品一区二区频| 日韩视频一区二区三区在线播放| 制服丝袜中文字幕一区| 免费人成精品欧美精品| 在线成人午夜影院| 国产91在线看| 岛国精品在线播放| 不卡欧美aaaaa| 99久久精品费精品国产一区二区 | 老汉av免费一区二区三区| 视频一区欧美精品| 日本中文字幕一区二区有限公司| 秋霞国产午夜精品免费视频| 蜜桃一区二区三区在线观看| 久久99热这里只有精品| 国产一区二三区好的| 国产成人欧美日韩在线电影| 不卡一区二区三区四区| 97se亚洲国产综合自在线不卡| 91丨九色porny丨蝌蚪| 欧美性猛交xxxx乱大交退制版| 欧美日韩国产123区| 日韩三级视频在线看| 久久久高清一区二区三区| 久久久久国产精品厨房| 日韩理论片网站| 亚洲综合色婷婷| 日韩综合小视频| 精品亚洲成a人在线观看| 国产精品乡下勾搭老头1| 91在线小视频| 欧美日韩一区高清| 精品国产污网站| 中文字幕人成不卡一区| 午夜精品久久久久久久99樱桃| 精品一区二区免费看| 国产成a人无v码亚洲福利| 色欧美乱欧美15图片| 日韩理论片网站| 日韩精品视频网| 国产福利不卡视频| 欧美中文字幕一区二区三区 | 亚洲永久免费视频| 蜜臀av性久久久久蜜臀aⅴ流畅| 国产.欧美.日韩| 欧美日韩精品免费| 中文字幕av一区二区三区免费看| 亚洲一区在线观看视频| 国产精品911| 欧美日韩情趣电影| 欧美韩日一区二区三区| 日韩高清不卡在线| 91影视在线播放| 久久一二三国产| 天堂在线亚洲视频| 波多野结衣91| 久久夜色精品国产噜噜av| 亚洲观看高清完整版在线观看 | 视频一区二区三区在线| 成人久久久精品乱码一区二区三区| 欧美伦理影视网| 亚洲女人的天堂| 国产精品一区二区免费不卡 | 亚洲另类在线一区| 国产一区二区毛片| 欧美精品色综合| 亚洲精品成人a在线观看| 国产一区二区调教| 欧美一区二区三区四区久久| 综合欧美一区二区三区| 国产成人在线电影| 日韩欧美综合一区| 亚洲国产一区二区在线播放| 丁香婷婷综合网| 精品美女在线播放| 日本特黄久久久高潮| 欧美午夜宅男影院| 亚洲精品老司机| 白白色亚洲国产精品| 久久久久久久久99精品| 久久99精品一区二区三区三区| 欧美伊人久久大香线蕉综合69| 中文字幕欧美一区| 成人视屏免费看| 国产三级三级三级精品8ⅰ区| 老色鬼精品视频在线观看播放| 欧美伦理电影网| 午夜精品123| 欧美日韩免费观看一区二区三区 | 欧美在线影院一区二区| 国产精品的网站| www.日韩在线| 综合久久一区二区三区| 国产亚洲短视频| 国产在线播放一区二区三区 | 一区二区三区欧美日| 91美女片黄在线观看| 一区在线中文字幕| eeuss鲁片一区二区三区在线看| 国产欧美日本一区二区三区| 国产福利一区在线观看| 国产欧美日韩亚州综合| 成人黄色电影在线| 中文字幕一区二区在线观看| www..com久久爱| 亚洲男女毛片无遮挡| 91国产丝袜在线播放| 亚洲一级二级三级在线免费观看| 欧美亚洲图片小说| 天天影视色香欲综合网老头| 91精品国产欧美一区二区成人 | 天堂av在线一区| 6080yy午夜一二三区久久| 丝袜美腿一区二区三区| 日韩丝袜情趣美女图片| 狠狠狠色丁香婷婷综合久久五月| 2021国产精品久久精品| 国产成人8x视频一区二区| 中文字幕一区免费在线观看| 91国产视频在线观看| 日韩电影免费一区| 久久久亚洲欧洲日产国码αv| 国产成人小视频| 亚洲三级在线观看| 51午夜精品国产| 国产福利精品一区二区| 亚洲视频小说图片| 在线播放中文一区| 国产露脸91国语对白| 亚洲精品成人天堂一二三| 日韩一卡二卡三卡| 国产成人aaa| 亚洲图片欧美综合| 久久一夜天堂av一区二区三区| 成人国产在线观看| 亚洲444eee在线观看| 精品久久久久久久久久久久包黑料 | 久久九九国产精品| 色综合天天综合在线视频| 日韩国产在线一| 中文字幕欧美区| 欧美色图在线观看| 国产毛片精品视频| 亚洲二区视频在线| 2023国产一二三区日本精品2022| 91蜜桃传媒精品久久久一区二区 | 91免费在线视频观看| 喷水一区二区三区| 国产精品成人午夜| 日韩欧美中文字幕一区| 99精品国产91久久久久久| 日韩精品一二区| 国产精品国产精品国产专区不片| 91精品国产免费| 91蝌蚪porny九色| 久久99精品国产| 亚洲国产精品影院| 国产精品网友自拍| 日韩午夜激情免费电影| 一本色道久久综合亚洲aⅴ蜜桃| 另类的小说在线视频另类成人小视频在线 | 日韩精品一区二区三区在线播放 | 色狠狠综合天天综合综合| 美女诱惑一区二区| 亚洲与欧洲av电影| 国产精品麻豆视频| 精品国产一区二区三区忘忧草 |