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

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

?? springutilities.java

?? java tutotrials or beginners
?? JAVA
字號(hào):
/* * 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);    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
97se亚洲国产综合自在线 | 中文字幕免费不卡在线| 欧美放荡的少妇| 欧美日韩视频在线一区二区| 色偷偷一区二区三区| 99久久精品99国产精品| 91色在线porny| 欧亚洲嫩模精品一区三区| 色噜噜狠狠一区二区三区果冻| 91麻豆视频网站| 欧美喷潮久久久xxxxx| 6080国产精品一区二区| 日韩欧美亚洲国产精品字幕久久久| 欧美肥胖老妇做爰| xf在线a精品一区二区视频网站| 久久精品视频网| 玉米视频成人免费看| 午夜精品福利一区二区蜜股av| 人人狠狠综合久久亚洲| 国产一区二区在线观看视频| 99久久精品免费看| 欧美老年两性高潮| 久久精品一区二区| 亚洲精品成人精品456| 亚洲国产成人av网| 激情综合色播五月| 99re在线精品| 日韩精品一区二区三区swag| 自拍偷自拍亚洲精品播放| 亚洲高清在线视频| 国产剧情一区在线| 欧美日韩精品欧美日韩精品一综合| 欧美成人三级在线| 亚洲三级电影网站| 久久电影网电视剧免费观看| 99精品在线观看视频| 日韩视频不卡中文| 亚洲欧美自拍偷拍| 久久丁香综合五月国产三级网站| 一本大道久久a久久综合婷婷| 日韩视频一区在线观看| 亚洲男同1069视频| 国产成人免费网站| 日韩欧美综合一区| 亚洲成av人影院在线观看网| 国产成人av自拍| 日韩色视频在线观看| 亚洲国产cao| 一本到三区不卡视频| 欧美国产精品中文字幕| 久草这里只有精品视频| 91精品啪在线观看国产60岁| 一区二区久久久久| 成人h精品动漫一区二区三区| 日韩精品最新网址| 香港成人在线视频| 91久久国产综合久久| 中文字幕日本乱码精品影院| 国产寡妇亲子伦一区二区| 欧美一区二区免费视频| 亚洲国产一区视频| 色一情一伦一子一伦一区| 国产精品免费视频一区| 粉嫩嫩av羞羞动漫久久久| 精品福利一区二区三区免费视频| 日韩影院免费视频| 8v天堂国产在线一区二区| 亚洲午夜久久久久久久久电影网| www.日韩大片| 亚洲欧美在线aaa| 99久免费精品视频在线观看| 中文字幕成人av| 成年人国产精品| 国产精品日产欧美久久久久| 成人久久久精品乱码一区二区三区| 久久午夜羞羞影院免费观看| 国产一区在线看| 国产视频911| 成人丝袜高跟foot| 亚洲精品国产品国语在线app| 91麻豆精品秘密| 一区二区三区国产豹纹内裤在线| 色噜噜夜夜夜综合网| 亚洲午夜精品久久久久久久久| 在线视频中文字幕一区二区| 亚洲一区二区在线观看视频| 欧美精品少妇一区二区三区| 日本不卡免费在线视频| 久久综合九色综合欧美就去吻| 国产伦精品一区二区三区免费| 欧美激情一区二区三区全黄| 91影视在线播放| 日韩在线卡一卡二| 久久九九久精品国产免费直播| 99久久er热在这里只有精品15| 亚洲综合一二区| 日韩精品中文字幕在线一区| 国产成人亚洲综合a∨猫咪 | 成人国产一区二区三区精品| 一区二区在线观看免费视频播放| 欧美综合久久久| 精品中文字幕一区二区小辣椒| 国产亚洲污的网站| 欧美在线观看禁18| 国产馆精品极品| 亚洲与欧洲av电影| 26uuu成人网一区二区三区| 91在线观看一区二区| 亚洲国产精品一区二区久久| 亚洲精品在线免费观看视频| 成人高清免费观看| 视频一区二区三区中文字幕| 国产清纯白嫩初高生在线观看91| gogogo免费视频观看亚洲一| 日韩不卡在线观看日韩不卡视频| 久久奇米777| 欧美日韩和欧美的一区二区| 国产黄人亚洲片| 天堂成人国产精品一区| 国产精品青草久久| 日韩免费观看高清完整版在线观看| 9人人澡人人爽人人精品| 蜜乳av一区二区| 一区二区三区丝袜| 国产欧美日韩综合| 欧美一区二区三区公司| 在线视频中文字幕一区二区| 成人黄页在线观看| 国产原创一区二区三区| 日韩黄色免费电影| 亚洲午夜在线观看视频在线| 国产精品乱码一区二区三区软件| 日韩免费高清电影| 欧美老女人第四色| 欧美三级一区二区| 欧洲生活片亚洲生活在线观看| 成人免费黄色大片| 成人在线视频首页| 粉嫩13p一区二区三区| 久久国产麻豆精品| 日日骚欧美日韩| 亚洲电影第三页| 亚洲午夜久久久久久久久电影院| 日韩美女啊v在线免费观看| 欧美国产日本韩| 欧美国产欧美综合| 国产精品久久久久久久久图文区| 国产欧美日韩三级| 国产目拍亚洲精品99久久精品| www激情久久| 国产日韩成人精品| 国产精品嫩草久久久久| 国产精品高清亚洲| 中文字幕日本不卡| 亚洲精品视频在线| 亚洲午夜久久久| 日本系列欧美系列| 韩国一区二区视频| 国产精品77777竹菊影视小说| 国产精品一区在线| 豆国产96在线|亚洲| 91小视频在线观看| 欧美亚洲国产怡红院影院| 欧美日韩综合一区| 日韩一级在线观看| 国产日韩欧美综合一区| 国产精品久久久久久亚洲毛片 | 亚洲成人777| 蜜桃一区二区三区在线观看| 老司机一区二区| 国产经典欧美精品| 色婷婷精品久久二区二区蜜臀av | 26uuu亚洲| 中文字幕第一区综合| 一区二区三区成人| 日本欧洲一区二区| 成人性色生活片免费看爆迷你毛片| 不卡电影一区二区三区| 欧美日韩午夜在线视频| 久久久久一区二区三区四区| 亚洲视频一区二区在线| 日本系列欧美系列| 在线观看av一区| 久久亚洲私人国产精品va媚药| 国产精品久久看| 日本一区中文字幕| 99视频在线精品| 欧美一级黄色录像| 亚洲天堂精品在线观看| 美女视频黄 久久| 色婷婷精品久久二区二区蜜臂av | 免费在线视频一区| 国产成人精品www牛牛影视| 欧美少妇xxx| 久久久精品欧美丰满| 亚洲一区中文在线| 高清国产一区二区| 欧美一区二区观看视频| 一区精品在线播放| 国产综合色在线|