亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美日韩综合在线免费观看| 久久精品国内一区二区三区| 久久久久久麻豆| 91精品国产欧美一区二区18| 欧美日韩视频不卡| 欧美精品自拍偷拍| 欧美日韩国产综合草草| 欧美日韩一区二区不卡| 欧美日韩精品一区二区三区四区| 91福利在线观看| 欧美精品 日韩| 欧美一区二区久久久| 精品成人私密视频| www国产亚洲精品久久麻豆| 欧美精品一区二区高清在线观看| 日韩欧美美女一区二区三区| 欧美mv日韩mv国产网站app| www久久久久| 自拍偷拍亚洲激情| 日韩av午夜在线观看| 国产原创一区二区| 99热99精品| 国产亚洲一本大道中文在线| 久久久久久久精| 自拍偷在线精品自拍偷无码专区| 一区二区成人在线视频 | 精品无人区卡一卡二卡三乱码免费卡| 久久99精品久久久| 91视频com| 日韩欧美电影在线| 国产日韩欧美麻豆| 亚洲福利视频导航| 国产激情一区二区三区四区| 日本高清不卡aⅴ免费网站| 欧美精品一卡两卡| 国产精品国产自产拍在线| 亚洲综合久久久久| 国产尤物一区二区在线| 在线看不卡av| 国产三级久久久| 亚洲一卡二卡三卡四卡| 国产资源在线一区| 色88888久久久久久影院按摩| 欧美一区2区视频在线观看| 欧美激情一区在线| 日韩激情中文字幕| 成人免费视频一区| 国产精品激情偷乱一区二区∴| 亚洲成a人v欧美综合天堂| 国产精品亚洲成人| 欧美日韩大陆在线| 亚洲精品视频在线| 国产成人精品www牛牛影视| 欧美丰满一区二区免费视频| 中文字幕一区二区视频| 蜜桃91丨九色丨蝌蚪91桃色| 91麻豆精品秘密| 国产欧美日韩麻豆91| 日日骚欧美日韩| 国产91清纯白嫩初高中在线观看 | 成人黄页毛片网站| 91免费观看视频| 欧美成人三级在线| 亚洲777理论| 色欧美乱欧美15图片| 2021国产精品久久精品| 日本亚洲欧美天堂免费| 在线观看日产精品| 一区二区三区中文在线| 成人动漫在线一区| 国产拍欧美日韩视频二区| 99久久国产综合精品麻豆| 亚洲国产电影在线观看| 蜜臀久久99精品久久久久宅男| 91精品综合久久久久久| 首页综合国产亚洲丝袜| 在线成人高清不卡| 蜜桃av噜噜一区二区三区小说| 欧美一级一区二区| 精油按摩中文字幕久久| 精品国产乱码久久久久久久久| 九九九久久久精品| 精品国一区二区三区| 国产麻豆精品95视频| 亚洲国产精品t66y| 99久久99精品久久久久久| 1024国产精品| 欧美三级视频在线| 免费在线观看日韩欧美| 久久久久久一级片| av亚洲精华国产精华精华| 一区二区三区中文字幕| 在线观看91av| 国产福利精品一区| 成人欧美一区二区三区视频网页| 成人动漫在线一区| 香蕉久久一区二区不卡无毒影院 | 国产一区二区三区综合| 欧美韩国日本综合| 久久久久青草大香线综合精品| 国产成a人无v码亚洲福利| 国产精品黄色在线观看| 欧美在线免费视屏| 国精产品一区一区三区mba视频 | 在线播放日韩导航| 国内精品写真在线观看| 亚洲精品视频一区| 日韩欧美的一区| 成人在线综合网| 日韩专区在线视频| 国产精品网友自拍| 91精品国产综合久久精品图片| 国产精品一区二区三区乱码| 亚洲男人天堂av| 欧美tickling挠脚心丨vk| 不卡av免费在线观看| 日韩电影免费在线| 亚洲欧美日韩中文字幕一区二区三区| 欧美日产在线观看| eeuss影院一区二区三区| 奇米一区二区三区| 一区二区三区色| 欧美国产欧美亚州国产日韩mv天天看完整| 精品国产免费一区二区三区四区| 97精品久久久久中文字幕| 国产制服丝袜一区| 午夜激情一区二区三区| 综合欧美一区二区三区| 国产欧美一区二区精品性| 欧美精品丝袜久久久中文字幕| av欧美精品.com| 精品一二线国产| 日韩成人午夜精品| 亚洲国产成人porn| 亚洲免费伊人电影| 国产精品乱码一区二区三区软件| 欧美成人一区二区三区| 欧美精品丝袜久久久中文字幕| 色狠狠av一区二区三区| 成人激情免费网站| 福利一区福利二区| 国产成人免费视频网站高清观看视频| 婷婷六月综合网| 亚洲不卡一区二区三区| 亚洲综合在线第一页| 一区二区三区四区五区视频在线观看| 国产女主播一区| 日本一区二区三区久久久久久久久不 | 91国产免费看| 色香蕉成人二区免费| 99久久精品国产网站| 97se亚洲国产综合在线| 成人app网站| hitomi一区二区三区精品| 成人小视频免费观看| 国产精品夜夜爽| 国产xxx精品视频大全| 国产精品一区二区三区网站| 国产福利91精品一区二区三区| 国产91丝袜在线观看| 成人免费电影视频| 色妞www精品视频| 欧美日韩一卡二卡三卡 | 日韩欧美亚洲另类制服综合在线 | 精品久久一区二区三区| 26uuu精品一区二区| 久久久综合精品| 亚洲欧美在线aaa| 亚洲一级电影视频| 久久不见久久见免费视频7| 国产精一区二区三区| www.爱久久.com| 欧美日韩国产精选| 久久美女艺术照精彩视频福利播放| 国产亚洲一本大道中文在线| 18成人在线观看| 日韩av一区二区三区四区| 国产一区二区成人久久免费影院 | 欧美三级中文字幕在线观看| 欧美一区二区三区视频| 国产亚洲精品中文字幕| 亚洲伊人色欲综合网| 极品少妇xxxx精品少妇偷拍| caoporn国产精品| 欧美另类高清zo欧美| 久久精品欧美一区二区三区麻豆| 亚洲欧洲精品一区二区三区不卡| 天天综合色天天综合色h| 国产91精品一区二区麻豆亚洲| 91精彩视频在线观看| 欧美成人bangbros| 亚洲激情欧美激情| 国产一区二区三区精品视频| 日本二三区不卡| 中文字幕欧美日韩一区| 日韩精品免费专区| 91免费视频大全| 久久综合国产精品| 日韩成人av影视| 日本久久电影网|