亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美一区二区高清| 一区二区三区精品视频| 中文字幕日韩精品一区| 无吗不卡中文字幕| www.在线欧美| 国产欧美日韩另类视频免费观看| 亚洲成av人片一区二区梦乃| voyeur盗摄精品| 亚洲精品一区二区三区四区高清| 一区二区三区日韩欧美| 粉嫩av一区二区三区粉嫩| 日韩亚洲欧美一区二区三区| 亚洲精品成人悠悠色影视| 国产精品 欧美精品| 777a∨成人精品桃花网| 亚洲综合色自拍一区| 北岛玲一区二区三区四区| 日本一区免费视频| 国产曰批免费观看久久久| 日韩一区和二区| 日本在线不卡一区| 日韩一区二区精品葵司在线| 亚洲天堂a在线| 成人性生交大片| 欧美图片一区二区三区| 日韩亚洲欧美一区二区三区| 亚洲激情一二三区| 91蜜桃在线观看| 亚洲欧美另类综合偷拍| 99精品视频在线播放观看| 中文字幕国产一区二区| 国产剧情在线观看一区二区| 精品国产凹凸成av人导航| 国产自产高清不卡| 精品捆绑美女sm三区| 久久99国产精品久久| 精品黑人一区二区三区久久| 美女视频黄久久| 久久综合成人精品亚洲另类欧美| 精品无码三级在线观看视频| 精品国产髙清在线看国产毛片| 久久国产精品露脸对白| 精品精品欲导航| 国产激情一区二区三区四区| 欧美日韩的一区二区| 亚洲国产成人av网| 欧美一区二区三区在线电影| 美日韩一区二区| 国产欧美日韩另类一区| 色偷偷88欧美精品久久久| 亚洲黄色av一区| 在线播放中文字幕一区| 精彩视频一区二区三区| 国产精品毛片a∨一区二区三区| 91在线丨porny丨国产| 午夜精品一区二区三区三上悠亚| 欧美一个色资源| 9色porny自拍视频一区二区| 亚洲一区二区三区视频在线| 欧美一区二区三区视频在线| 国产成人av网站| 一区二区三区资源| 久久网站最新地址| 91成人看片片| 国产精品伊人色| 亚洲精品免费播放| wwwwxxxxx欧美| 色综合天天狠狠| 国产综合色产在线精品| 一区二区三区波多野结衣在线观看| 日韩欧美另类在线| 色网站国产精品| 国产一区二区三区最好精华液| 一区二区三区在线视频免费| 欧美精品一区二区在线观看| 91传媒视频在线播放| 国产黄人亚洲片| 青青青伊人色综合久久| 亚洲欧洲精品天堂一级| 日韩欧美一区在线| 欧美三级资源在线| 成人网在线播放| 精品一区二区三区的国产在线播放| 亚洲黄色性网站| 国产精品第13页| 欧美精品一区二区三区很污很色的| 色8久久精品久久久久久蜜| 国产一区二区三区久久悠悠色av| 三级欧美在线一区| 一区二区三区成人| 亚洲视频免费观看| 国产女人18毛片水真多成人如厕| 日韩欧美一区二区免费| 欧美三区免费完整视频在线观看| 91小视频免费观看| 不卡的av网站| 国产91精品一区二区麻豆网站 | av一本久道久久综合久久鬼色| 久久精品国产第一区二区三区| 亚洲在线视频网站| 亚洲美女在线一区| 亚洲女与黑人做爰| 亚洲欧美日韩国产手机在线 | 亚洲国产欧美日韩另类综合| 国产精品午夜在线观看| 精品国产1区二区| 久久一二三国产| 久久综合视频网| 久久久久久久av麻豆果冻| 久久久久久久久久看片| 久久综合久色欧美综合狠狠| 精品美女在线观看| 国产亚洲精品久| 亚洲精品一区二区三区蜜桃下载| 亚洲精品在线观| 国产日韩三级在线| 中文字幕色av一区二区三区| 国产精品二三区| 夜夜精品浪潮av一区二区三区| 亚洲精品你懂的| 婷婷激情综合网| 日韩福利电影在线| 韩国精品主播一区二区在线观看 | 日韩综合在线视频| 日本一道高清亚洲日美韩| 麻豆精品一区二区综合av| 精品一区二区综合| 成人av第一页| 欧美四级电影网| 日韩欧美在线影院| 国产亲近乱来精品视频| 日韩美女视频一区二区| 亚洲综合一区二区精品导航| 日本不卡一二三| 国产乱人伦偷精品视频不卡| 成人国产精品免费观看视频| 色欧美片视频在线观看| 91精品国产综合久久精品麻豆| 精品美女在线播放| 亚洲视频免费在线| 麻豆国产精品官网| 成人av网站在线| 91精品国产福利在线观看| 久久网这里都是精品| 亚洲蜜桃精久久久久久久| 蜜臀久久99精品久久久画质超高清| 国产主播一区二区三区| 97久久超碰国产精品| 欧美一级理论片| 国产精品久久久久影院老司| 亚洲成a人v欧美综合天堂| 国产一区二区调教| 欧美色图一区二区三区| 国产校园另类小说区| 亚洲va韩国va欧美va精品| 国产精品亚洲第一区在线暖暖韩国| 色噜噜狠狠成人网p站| 久久影院电视剧免费观看| 亚洲成a人在线观看| 成人黄色免费短视频| 欧美电影免费观看高清完整版 | 欧美视频日韩视频| 精品成人一区二区三区四区| 亚洲精品va在线观看| 国产成人av电影| 日韩女优毛片在线| 亚洲aaa精品| 国产a久久麻豆| 精品91自产拍在线观看一区| 亚洲va天堂va国产va久| 91视频一区二区| 国产日韩av一区| 久久精品国产99国产| 欧美日韩亚洲综合在线 欧美亚洲特黄一级 | 色综合久久中文综合久久97| 26uuu色噜噜精品一区二区| 婷婷成人激情在线网| 一本色道综合亚洲| 中文字幕国产一区| 国产乱一区二区| 久久婷婷国产综合精品青草| 欧美96一区二区免费视频| 欧美人与z0zoxxxx视频| 亚洲一区二三区| 色偷偷久久一区二区三区| 亚洲日本在线看| 91在线精品一区二区三区| 欧美激情在线观看视频免费| 国产在线观看一区二区| 欧美xxxx在线观看| 日本免费在线视频不卡一不卡二| 欧美四级电影网| 午夜精品福利一区二区蜜股av| 在线观看日韩精品| 亚洲一区二区三区四区在线免费观看 | 国产精品一区不卡| 国产色产综合产在线视频| 国产精品一区二区男女羞羞无遮挡| 精品久久久久香蕉网| 国产乱理伦片在线观看夜一区|