亚洲欧美第一页_禁久久精品乱码_粉嫩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 layout;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一区二区三区免费野_久草精品视频
国产精品高潮呻吟久久| 久久久久久久综合日本| 国产精一区二区三区| 亚洲日本青草视频在线怡红院| 91精品国产综合久久精品图片| 成人久久视频在线观看| 麻豆精品精品国产自在97香蕉| 伊人开心综合网| 国产精品入口麻豆九色| 精品国产成人在线影院| 欧美狂野另类xxxxoooo| 色综合欧美在线| 成人精品免费网站| 国产九九视频一区二区三区| 看电视剧不卡顿的网站| 天天操天天干天天综合网| 亚洲乱码日产精品bd| 国产精品电影院| 国产精品三级久久久久三级| 欧美不卡123| 欧美mv日韩mv| 日韩小视频在线观看专区| 8x8x8国产精品| 欧美精品视频www在线观看 | 日产国产欧美视频一区精品| 日韩理论在线观看| 国产精品三级av在线播放| 国产午夜精品美女毛片视频| 欧美tickling挠脚心丨vk| 91精品国产综合久久精品麻豆 | 久久久av毛片精品| 欧美成人一区二区三区片免费| 欧美精品1区2区3区| 欧美高清性hdvideosex| 欧美高清视频在线高清观看mv色露露十八 | 久久香蕉国产线看观看99| 日韩天堂在线观看| 日韩一区二区三区免费看| 日韩写真欧美这视频| 日韩三级高清在线| 精品国产a毛片| 久久老女人爱爱| 国产女同性恋一区二区| 欧美韩国日本综合| 综合欧美一区二区三区| 亚洲日本丝袜连裤袜办公室| 亚洲午夜在线电影| 天使萌一区二区三区免费观看| 日韩影院免费视频| 精品综合久久久久久8888| 久久99国产精品久久99| 国产精品夜夜嗨| 国产成人aaaa| 一本久久综合亚洲鲁鲁五月天| 欧美视频一区二区在线观看| 69堂国产成人免费视频| 精品国产乱码久久久久久牛牛| 国产日韩精品久久久| 亚洲人成网站影音先锋播放| 亚洲国产视频一区二区| 喷白浆一区二区| 高清不卡一二三区| 在线看国产一区| 欧美成人精品福利| 亚洲欧美综合另类在线卡通| 午夜一区二区三区视频| 精品一区二区在线播放| av一区二区不卡| 91精品国模一区二区三区| 久久精品日韩一区二区三区| 亚洲少妇30p| 欧美bbbbb| 91理论电影在线观看| 在线不卡欧美精品一区二区三区| 久久综合视频网| 亚洲一区二区三区自拍| 韩日精品视频一区| 欧美无砖专区一中文字| 精品国产乱码久久| 一区二区免费在线| 国产一区二区三区精品欧美日韩一区二区三区 | 亚洲欧美激情小说另类| 日本网站在线观看一区二区三区| 国产不卡在线播放| 欧美久久一区二区| 中文av一区二区| 日本美女一区二区| 色综合久久综合中文综合网| 韩国av一区二区三区在线观看| 色天使久久综合网天天| 久久久精品国产免大香伊| 亚洲一区二区三区在线看| 国产美女一区二区三区| 欧美日韩精品一区二区| 中文字幕精品综合| 精品一区二区三区在线视频| 欧美中文字幕久久 | 日韩精品欧美成人高清一区二区| 国产91在线观看| 日韩欧美国产小视频| 亚洲一二三区在线观看| 成人做爰69片免费看网站| 日韩欧美国产三级电影视频| 亚洲夂夂婷婷色拍ww47| 国产精一区二区三区| 日韩一区二区三区四区五区六区| 亚洲激情自拍偷拍| 成人av在线播放网站| 久久尤物电影视频在线观看| 日韩av中文在线观看| 91高清在线观看| 亚洲欧美怡红院| 成人网在线免费视频| 久久日韩精品一区二区五区| 奇米影视7777精品一区二区| 欧美日韩免费高清一区色橹橹 | 亚洲国产精品久久久久婷婷884| 成人性生交大片免费看视频在线| 久久伊人蜜桃av一区二区| 男人操女人的视频在线观看欧美 | 欧美一区二区三区不卡| 婷婷综合五月天| 欧美在线影院一区二区| 一区二区三区 在线观看视频| 9久草视频在线视频精品| 国产欧美日韩在线| 成人一区二区三区在线观看| 国产日韩av一区| 国产成人综合视频| 久久久久久久久一| 国产成人综合自拍| 国产精品免费视频网站| 99久久免费视频.com| 亚洲色图在线视频| 色哟哟精品一区| 一区二区三区高清| 欧美在线不卡一区| 亚洲成人动漫在线免费观看| 欧美日韩国产经典色站一区二区三区| 亚洲最新视频在线观看| 欧美日韩中文字幕一区| 日韩电影在线观看一区| 欧美一区二区三区小说| 精品无码三级在线观看视频| 国产色91在线| www.综合网.com| 亚洲已满18点击进入久久| 欧美日韩精品福利| 久久精品99国产精品日本| 国产亚洲短视频| 丝袜亚洲另类欧美| 日韩欧美国产不卡| 不卡av电影在线播放| 91精品国产aⅴ一区二区| 日韩福利视频导航| 久久久午夜电影| 91伊人久久大香线蕉| 午夜欧美大尺度福利影院在线看| 91精品一区二区三区久久久久久| 久久爱www久久做| 国产欧美日本一区二区三区| 色欧美片视频在线观看| 天天综合天天综合色| 久久久亚洲高清| 一本到不卡免费一区二区| 日本女优在线视频一区二区| 久久网站热最新地址| 色成人在线视频| 另类欧美日韩国产在线| 国产欧美日本一区二区三区| 欧美无砖砖区免费| 国产美女av一区二区三区| 亚洲卡通欧美制服中文| 日韩精品一区二区三区中文不卡 | 91久久精品午夜一区二区| 免费观看成人鲁鲁鲁鲁鲁视频| 欧美经典三级视频一区二区三区| 91黄色免费版| 国产黑丝在线一区二区三区| 亚洲一二三四区不卡| 久久噜噜亚洲综合| 欧美日韩免费不卡视频一区二区三区| 国产精品一区三区| 午夜电影一区二区| 国产精品久久精品日日| 欧美一卡2卡三卡4卡5免费| jvid福利写真一区二区三区| 视频一区国产视频| 亚洲欧洲制服丝袜| 久久久久国产精品厨房| 欧美三区免费完整视频在线观看| 国产精品亚洲午夜一区二区三区| 亚洲五月六月丁香激情| 国产精品免费视频一区| 精品久久99ma| 88在线观看91蜜桃国自产| 亚洲欧洲精品一区二区精品久久久 | 9i看片成人免费高清| 久久99精品国产麻豆婷婷洗澡| 亚洲国产综合人成综合网站|