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

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

?? springutilities.java

?? java tutorial.sun公司官方出品。java入門書籍。最新版
?? 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一区二区三区免费野_久草精品视频
国产丝袜欧美中文另类| 日韩一区二区三区av| 亚洲久草在线视频| 一本一道波多野结衣一区二区| 国产精品成人一区二区艾草 | 美女在线观看视频一区二区| 777精品伊人久久久久大香线蕉| 免费视频一区二区| 久久免费午夜影院| 色婷婷亚洲精品| 男人的j进女人的j一区| 国产女同性恋一区二区| 91麻豆6部合集magnet| 日本中文字幕一区| 国产色91在线| 欧洲一区在线电影| 黄色日韩网站视频| 亚洲裸体在线观看| 欧美日韩小视频| 国产激情91久久精品导航| 亚洲黄色av一区| 久久综合色鬼综合色| 91一区一区三区| 久久99国产精品麻豆| 亚洲男同性视频| 精品国产百合女同互慰| 91丨porny丨首页| 久久精品国产亚洲高清剧情介绍| 亚洲国产精华液网站w| 欧美性videosxxxxx| 国产成人av电影在线| 亚洲成人中文在线| 国产精品人人做人人爽人人添| 欧美三级电影网| 国产一区二区伦理| 亚洲www啪成人一区二区麻豆| 国产三级一区二区三区| 欧美高清性hdvideosex| fc2成人免费人成在线观看播放| 视频一区欧美精品| 最新欧美精品一区二区三区| 日韩视频国产视频| 欧美视频你懂的| 99re热视频这里只精品| 国产一区二区在线观看免费| 亚洲成年人影院| 亚洲人成精品久久久久久| 久久久国产精华| 日韩精品综合一本久道在线视频| 在线看不卡av| 不卡视频免费播放| 国产高清精品网站| 韩国成人福利片在线播放| 日韩电影免费一区| 亚洲一区电影777| 亚洲欧美另类久久久精品 | 91在线观看视频| 国产成人免费视频网站高清观看视频| 日韩高清中文字幕一区| 久久久99久久| 欧美人体做爰大胆视频| 在线观看视频一区| 色老综合老女人久久久| 不卡的av电影| 成人免费看的视频| 成人三级在线视频| 国产99久久久国产精品潘金| 久久精品二区亚洲w码| 免费美女久久99| 奇米综合一区二区三区精品视频| 亚洲第四色夜色| 亚洲电影一级片| 亚洲va欧美va国产va天堂影院| 亚洲精品大片www| 亚洲伦在线观看| 一级精品视频在线观看宜春院 | 中文字幕一区二区5566日韩| 精品国产123| 精品欧美一区二区久久| 精品国偷自产国产一区| 久久综合狠狠综合久久综合88| 久久综合狠狠综合久久综合88| 日韩精品中文字幕在线不卡尤物| 日韩欧美国产一二三区| 精品国产亚洲在线| 久久蜜臀中文字幕| 日本一区二区三区四区在线视频| 国产欧美一区二区精品性色超碰| 久久久不卡影院| 国产精品国产自产拍高清av| 一区在线观看视频| 一区二区三区在线视频观看| 一区二区久久久| 日韩av中文在线观看| 久久97超碰国产精品超碰| 国产一区二区电影| av不卡一区二区三区| 欧美色偷偷大香| 日韩欧美一卡二卡| 欧美国产日韩亚洲一区| 亚洲欧美欧美一区二区三区| 亚洲成人av资源| 国产一区二区三区久久久| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 91精品国产欧美一区二区| 欧美一区二区三区四区五区| 国产视频911| 亚洲高清久久久| 国产一级精品在线| 在线观看免费成人| 久久综合国产精品| 夜色激情一区二区| 国产综合久久久久影院| 色88888久久久久久影院野外| 91精品婷婷国产综合久久竹菊| 国产欧美一区二区三区网站| 亚洲成人动漫av| 成人在线视频一区| 欧美福利电影网| 国产精品乱码一区二区三区软件| 亚洲.国产.中文慕字在线| 国产精品影视在线观看| 欧美亚洲另类激情小说| 久久久久97国产精华液好用吗| 亚洲一区二区三区在线看| 国产一区二区免费看| 欧美久久久影院| 日韩一区中文字幕| 精品在线观看免费| 欧美中文字幕亚洲一区二区va在线| wwww国产精品欧美| 丝瓜av网站精品一区二区| 不卡视频在线看| 久久先锋影音av鲁色资源网| 午夜av电影一区| 91社区在线播放| 欧美经典三级视频一区二区三区| 免费一级欧美片在线观看| 欧洲精品在线观看| 中文字幕一区二区三区在线不卡| 国产综合色在线| 欧美大片在线观看一区| 亚洲综合激情网| 一本在线高清不卡dvd| 久久久久高清精品| 韩国欧美国产1区| 日韩精品综合一本久道在线视频| 亚洲大片一区二区三区| 在线亚洲一区二区| 亚洲乱码国产乱码精品精可以看 | 美女视频黄 久久| 欧美日韩高清在线| 亚洲午夜视频在线| 91激情在线视频| 亚洲乱码一区二区三区在线观看| 成人精品一区二区三区四区 | 国产日产欧产精品推荐色| 麻豆国产一区二区| 欧美日本一道本在线视频| 亚洲午夜精品在线| 欧美色偷偷大香| 午夜国产精品影院在线观看| 精品视频123区在线观看| 一区二区三区久久| 欧美三电影在线| 亚洲6080在线| 日韩一区二区免费电影| 免费亚洲电影在线| 精品国产露脸精彩对白| 激情综合网激情| 久久久久久久久久美女| 国产福利91精品一区| 中文字幕+乱码+中文字幕一区| 成人一二三区视频| **网站欧美大片在线观看| 色综合天天在线| 亚洲国产婷婷综合在线精品| 欧美日韩一级片在线观看| 日韩成人伦理电影在线观看| 日韩欧美专区在线| 国产精品香蕉一区二区三区| 国产精品久久久久三级| 日本丶国产丶欧美色综合| 亚洲成年人网站在线观看| 日韩欧美久久久| 高清不卡一二三区| 亚洲精品乱码久久久久久久久 | 亚洲人成在线观看一区二区| 色婷婷香蕉在线一区二区| 亚洲gay无套男同| 精品少妇一区二区三区免费观看 | 色婷婷狠狠综合| 亚洲一区av在线| 精品三级av在线| 成人av网站在线| 午夜精品久久久久| 久久精品亚洲一区二区三区浴池 | 亚洲欧美另类久久久精品 | 色婷婷精品大视频在线蜜桃视频| 午夜私人影院久久久久|