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

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

?? springutilities.java

?? java tutotrials or beginners
?? JAVA
字號:
/* * Copyright (c) 1995 - 2008 Sun Microsystems, Inc.  All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * *   - Redistributions of source code must retain the above copyright *     notice, this list of conditions and the following disclaimer. * *   - Redistributions in binary form must reproduce the above copyright *     notice, this list of conditions and the following disclaimer in the *     documentation and/or other materials provided with the distribution. * *   - Neither the name of Sun Microsystems nor the names of its *     contributors may be used to endorse or promote products derived *     from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package components;import javax.swing.*;import javax.swing.SpringLayout;import java.awt.*;/** * A 1.4 file that provides utility methods for * creating form- or grid-style layouts with SpringLayout. * These utilities are used by several programs, such as * SpringBox and SpringCompactGrid. */public class SpringUtilities {    /**     * A debugging utility that prints to stdout the component's     * minimum, preferred, and maximum sizes.     */    public static void printSizes(Component c) {        System.out.println("minimumSize = " + c.getMinimumSize());        System.out.println("preferredSize = " + c.getPreferredSize());        System.out.println("maximumSize = " + c.getMaximumSize());    }    /**     * Aligns the first <code>rows</code> * <code>cols</code>     * components of <code>parent</code> in     * a grid. Each component is as big as the maximum     * preferred width and height of the components.     * The parent is made just big enough to fit them all.     *     * @param rows number of rows     * @param cols number of columns     * @param initialX x location to start the grid at     * @param initialY y location to start the grid at     * @param xPad x padding between cells     * @param yPad y padding between cells     */    public static void makeGrid(Container parent,                                int rows, int cols,                                int initialX, int initialY,                                int xPad, int yPad) {        SpringLayout layout;        try {            layout = (SpringLayout)parent.getLayout();        } catch (ClassCastException exc) {            System.err.println("The first argument to makeGrid must use SpringLayout.");            return;        }        Spring xPadSpring = Spring.constant(xPad);        Spring yPadSpring = Spring.constant(yPad);        Spring initialXSpring = Spring.constant(initialX);        Spring initialYSpring = Spring.constant(initialY);        int max = rows * cols;        //Calculate Springs that are the max of the width/height so that all        //cells have the same size.        Spring maxWidthSpring = layout.getConstraints(parent.getComponent(0)).                                    getWidth();        Spring maxHeightSpring = layout.getConstraints(parent.getComponent(0)).                                    getWidth();        for (int i = 1; i < max; i++) {            SpringLayout.Constraints cons = layout.getConstraints(                                            parent.getComponent(i));            maxWidthSpring = Spring.max(maxWidthSpring, cons.getWidth());            maxHeightSpring = Spring.max(maxHeightSpring, cons.getHeight());        }        //Apply the new width/height Spring. This forces all the        //components to have the same size.        for (int i = 0; i < max; i++) {            SpringLayout.Constraints cons = layout.getConstraints(                                            parent.getComponent(i));            cons.setWidth(maxWidthSpring);            cons.setHeight(maxHeightSpring);        }        //Then adjust the x/y constraints of all the cells so that they        //are aligned in a grid.        SpringLayout.Constraints lastCons = null;        SpringLayout.Constraints lastRowCons = null;        for (int i = 0; i < max; i++) {            SpringLayout.Constraints cons = layout.getConstraints(                                                 parent.getComponent(i));            if (i % cols == 0) { //start of new row                lastRowCons = lastCons;                cons.setX(initialXSpring);            } else { //x position depends on previous component                cons.setX(Spring.sum(lastCons.getConstraint(SpringLayout.EAST),                                     xPadSpring));            }            if (i / cols == 0) { //first row                cons.setY(initialYSpring);            } else { //y position depends on previous row                cons.setY(Spring.sum(lastRowCons.getConstraint(SpringLayout.SOUTH),                                     yPadSpring));            }            lastCons = cons;        }        //Set the parent's size.        SpringLayout.Constraints pCons = layout.getConstraints(parent);        pCons.setConstraint(SpringLayout.SOUTH,                            Spring.sum(                                Spring.constant(yPad),                                lastCons.getConstraint(SpringLayout.SOUTH)));        pCons.setConstraint(SpringLayout.EAST,                            Spring.sum(                                Spring.constant(xPad),                                lastCons.getConstraint(SpringLayout.EAST)));    }    /* Used by makeCompactGrid. */    private static SpringLayout.Constraints getConstraintsForCell(                                                int row, int col,                                                Container parent,                                                int cols) {        SpringLayout layout = (SpringLayout) parent.getLayout();        Component c = parent.getComponent(row * cols + col);        return layout.getConstraints(c);    }    /**     * Aligns the first <code>rows</code> * <code>cols</code>     * components of <code>parent</code> in     * a grid. Each component in a column is as wide as the maximum     * preferred width of the components in that column;     * height is similarly determined for each row.     * The parent is made just big enough to fit them all.     *     * @param rows number of rows     * @param cols number of columns     * @param initialX x location to start the grid at     * @param initialY y location to start the grid at     * @param xPad x padding between cells     * @param yPad y padding between cells     */    public static void makeCompactGrid(Container parent,                                       int rows, int cols,                                       int initialX, int initialY,                                       int xPad, int yPad) {        SpringLayout layout;        try {            layout = (SpringLayout)parent.getLayout();        } catch (ClassCastException exc) {            System.err.println("The first argument to makeCompactGrid must use SpringLayout.");            return;        }        //Align all cells in each column and make them the same width.        Spring x = Spring.constant(initialX);        for (int c = 0; c < cols; c++) {            Spring width = Spring.constant(0);            for (int r = 0; r < rows; r++) {                width = Spring.max(width,                                   getConstraintsForCell(r, c, parent, cols).                                       getWidth());            }            for (int r = 0; r < rows; r++) {                SpringLayout.Constraints constraints =                        getConstraintsForCell(r, c, parent, cols);                constraints.setX(x);                constraints.setWidth(width);            }            x = Spring.sum(x, Spring.sum(width, Spring.constant(xPad)));        }        //Align all cells in each row and make them the same height.        Spring y = Spring.constant(initialY);        for (int r = 0; r < rows; r++) {            Spring height = Spring.constant(0);            for (int c = 0; c < cols; c++) {                height = Spring.max(height,                                    getConstraintsForCell(r, c, parent, cols).                                        getHeight());            }            for (int c = 0; c < cols; c++) {                SpringLayout.Constraints constraints =                        getConstraintsForCell(r, c, parent, cols);                constraints.setY(y);                constraints.setHeight(height);            }            y = Spring.sum(y, Spring.sum(height, Spring.constant(yPad)));        }        //Set the parent's size.        SpringLayout.Constraints pCons = layout.getConstraints(parent);        pCons.setConstraint(SpringLayout.SOUTH, y);        pCons.setConstraint(SpringLayout.EAST, x);    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美女孩性生活视频| 日韩美女主播在线视频一区二区三区| 欧美成人女星排行榜| 捆绑紧缚一区二区三区视频| 337p亚洲精品色噜噜噜| 免费高清在线一区| 日本一区二区视频在线| 成人免费视频播放| 亚洲国产aⅴ天堂久久| 欧美一区二区三区影视| 日韩理论片在线| 亚洲女人的天堂| 欧美色爱综合网| 久久99热狠狠色一区二区| 欧美高清在线视频| 欧美人妇做爰xxxⅹ性高电影| 日韩va欧美va亚洲va久久| 久久久.com| 91精品婷婷国产综合久久性色| 国产一区二区三区精品欧美日韩一区二区三区 | 日韩电影网1区2区| 亚洲色图另类专区| 国产亚洲精品资源在线26u| 欧美三级视频在线| 在线视频综合导航| 成人午夜视频免费看| 国产乱子伦一区二区三区国色天香| 亚洲女性喷水在线观看一区| 久久综合久久久久88| 欧美美女黄视频| 欧美日韩一区二区不卡| av中文字幕亚洲| 成人av网站在线观看免费| 精品影院一区二区久久久| 日本欧美一区二区在线观看| 一区二区激情视频| 亚洲一区二区美女| 首页国产丝袜综合| 日韩av中文字幕一区二区| 美女被吸乳得到大胸91| 精品一区二区三区久久久| 天天亚洲美女在线视频| 亚洲色图在线播放| 亚洲免费大片在线观看| 一区二区久久久| 三级亚洲高清视频| 激情五月婷婷综合| 成人91在线观看| 欧美午夜电影在线播放| 欧美日韩你懂得| 7777精品伊人久久久大香线蕉的 | 欧美日韩dvd在线观看| 欧美精品乱人伦久久久久久| 日韩欧美国产一区二区三区| 国产丝袜欧美中文另类| 亚洲电影视频在线| 国产很黄免费观看久久| 日本久久电影网| 一区二区三区精品视频| 一区二区三区**美女毛片| 日韩黄色片在线观看| 波多野洁衣一区| 久久久久久久久伊人| 亚洲电影中文字幕在线观看| 成人高清免费观看| 精品久久人人做人人爰| 午夜亚洲国产au精品一区二区| 成人少妇影院yyyy| 久久婷婷成人综合色| 久久精品久久99精品久久| 欧美日韩免费高清一区色橹橹 | 国产精品美女久久久久高潮| 亚洲福利一二三区| 视频一区二区不卡| 色偷偷88欧美精品久久久| 久久众筹精品私拍模特| 美女视频一区二区三区| 欧美一区日本一区韩国一区| 亚洲综合色噜噜狠狠| 欧美伊人久久大香线蕉综合69| 国产精品久久综合| 91社区在线播放| 亚洲自拍偷拍麻豆| 在线播放/欧美激情| 亚洲1区2区3区4区| 欧美白人最猛性xxxxx69交| 美女视频黄免费的久久| 久久久久久久久久看片| 成人一区二区三区中文字幕| 国产精品久久久久四虎| 在线看日韩精品电影| 日韩成人免费电影| 久久久久国产精品人| 色琪琪一区二区三区亚洲区| 亚洲福利一区二区| 欧美高清一级片在线观看| 欧美日韩亚州综合| 99精品视频一区二区| 视频一区在线播放| 日韩美女视频19| 日韩欧美色综合网站| 国产精品亚洲成人| 亚洲成人777| 1024国产精品| 久久人人爽人人爽| 在线成人av影院| 97精品国产97久久久久久久久久久久| 一卡二卡欧美日韩| 精品成人a区在线观看| 色婷婷综合在线| 国产福利一区二区三区| 午夜精品福利在线| 亚洲国产一区二区三区青草影视| 51午夜精品国产| 亚洲v日本v欧美v久久精品| 日本一区二区成人在线| 日韩欧美色电影| 精品国产乱码久久久久久浪潮| 欧美日韩免费一区二区三区视频| 色哟哟欧美精品| 在线观看av一区| 欧美在线视频全部完| 色综合久久久久久久久| www.久久精品| 欧美日韩精品一区二区天天拍小说| 成人免费视频播放| 91高清视频在线| 欧美一级高清大全免费观看| 欧美狂野另类xxxxoooo| 欧美一区二区三区系列电影| 欧美国产一区在线| 亚洲国产高清在线观看视频| 国产日韩欧美亚洲| 亚洲一区二区av在线| 日韩制服丝袜先锋影音| 日韩电影在线观看一区| 国产**成人网毛片九色| 色婷婷久久综合| 精品久久久久久久一区二区蜜臀| 国产欧美日韩三区| 午夜国产精品一区| 99久久精品国产导航| 欧美一区二区视频观看视频| 国产精品免费看片| 日本美女一区二区三区视频| 成人动漫中文字幕| 久久先锋影音av鲁色资源网| 一区二区三区日韩欧美精品 | 一区二区视频在线看| 毛片av一区二区三区| 色欧美88888久久久久久影院| 欧美一区二区三区人| 亚洲五月六月丁香激情| 9久草视频在线视频精品| 26uuu国产日韩综合| 另类小说视频一区二区| 日韩一级黄色大片| 亚洲一区二区三区中文字幕| 视频一区在线播放| 91麻豆精品久久久久蜜臀| 亚洲一二三专区| 欧美吞精做爰啪啪高潮| 一区二区三区影院| 在线亚洲一区二区| 亚洲大型综合色站| 欧美顶级少妇做爰| 久久国产人妖系列| 国产亚洲欧美激情| 99久久精品国产观看| 亚洲一区二区视频| 日韩欧美高清dvd碟片| 国产高清不卡二三区| 亚洲欧洲美洲综合色网| 欧美三电影在线| 奇米色777欧美一区二区| 26uuu久久天堂性欧美| aa级大片欧美| 免费视频最近日韩| 国产精品免费aⅴ片在线观看| 日本道精品一区二区三区| 视频一区在线视频| 国产精品免费视频观看| 欧美精品久久99| av一区二区不卡| 久久精品国产精品亚洲综合| 欧美激情综合在线| 日韩视频一区二区三区在线播放| 成人性生交大片免费看在线播放| 综合av第一页| 国产日韩高清在线| 日韩精品一区二区三区四区| 色综合久久久久网| 成人黄色小视频在线观看| 激情综合五月天| 午夜精品成人在线| 亚洲成人先锋电影| 亚洲精品欧美在线| 136国产福利精品导航| 国产亚洲一区二区三区在线观看 | 国产精品99久|