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

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

?? gridsnaplayout.java

?? 《深入java虛擬機》一書的光盤
?? JAVA
字號:
/** Copyright (c) 1996-1999 Bill Venners. All Rights Reserved.** This Java source file is part of the Interactive Illustrations Web* Site, which is delivered in the applets directory of the CD-ROM* that accompanies the book "Inside the Java 2 Virtual Machine" by Bill* Venners, published by McGraw-Hill, 1999, ISBN: 0-07-135093-4. This* source file is provided for evaluation purposes only, but you can* redistribute it under certain conditions, described in the full* copyright notice below.** Full Copyright Notice:** All the web pages and Java applets delivered in the applets* directory of the CD-ROM, consisting of ".html," ".gif," ".class,"* and ".java" files, are copyrighted (c) 1996-1999 by Bill* Venners, and all rights are reserved.  This material may be copied* and placed on any commercial or non-commercial web server on any* network (including the internet) provided that the following* guidelines are followed:** a. All the web pages and Java Applets (".html," ".gif," ".class,"* and ".java" files), including the source code, that are delivered* in the applets directory of the CD-ROM that* accompanies the book must be published together on the same web* site.** b. All the web pages and Java Applets (".html," ".gif," ".class,"* and ".java" files) must be published "as is" and may not be altered* in any way.** c. All use and access to this web site must be free, and no fees* can be charged to view these materials, unless express written* permission is obtained from Bill Venners.** d. The web pages and Java Applets may not be distributed on any* media, other than a web server on a network, and may not accompany* any book or publication.** BILL VENNERS MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE* SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING* BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,* FITNESS FOR PARTICULAR PURPOSE, OR NON-INFRINGEMENT.  BILL VENNERS* SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY A LICENSEE AS A* RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS* DERIVATIVES.*/package COM.artima.jvmsim;import java.awt.*;/*** GridSnapLayout lays out components in a grid that can have columns of* varying width. This is not a very general purpose layout manager. It* solves the specific problem of getting all the information I want to display about* the stack and method areas in a nice grid. Because some columns of info need* more room than others, and space is limited on a web page, I needed to be* able to specify varying widths of columns in a grid.** @author  Bill Venners*/class GridSnapLayout implements LayoutManager {    // rows and cols are the number of rows and columns of the grid upon    // which the components are placed. Components are always one row    // in height, but may be more than one column in width. The number    // of columns width of each component is stored in hComponentCellWidths.    // The array length of hComponentCellWidths indicates the number of    // components that will appear on each row.    private int rows;    private int cols;    private int[] hComponentCellWidths;    public GridSnapLayout(int rows, int cols, int[] hComponentCellWidths) {    	this.rows = rows;    	this.cols = cols;    	this.hComponentCellWidths = hComponentCellWidths;    }    public void addLayoutComponent(String name, Component comp) {    }    public void removeLayoutComponent(Component comp) {    }    // Calculate preferred size as if each component were taking an equal    // share of the width of a row.    public Dimension preferredLayoutSize(Container parent) {    	int rowCount = rows;    	int colCount = cols;    	Insets parentInsets = parent.insets();    	int componentCount = parent.countComponents();    	if (rowCount > 0) {    	    colCount = (componentCount + rowCount - 1) / rowCount;    	} else {    	    rowCount = (componentCount + colCount - 1) / colCount;    	}        // Find the maximum preferred width and the maximum preferred height        // of any component.    	int w = 0;    	int h = 0;    	for (int i = 0; i < componentCount; i++) {    	    Component comp = parent.getComponent(i);    	    Dimension d = comp.preferredSize();    	    if (w < d.width) {    		    w = d.width;    	    }    	    if (h < d.height) {    		    h = d.height;    	    }    	}    	// Return the maximum preferred component width and height times the number    	// of columns and rows, respectively, plus any insets in the parent.    	return new Dimension(parentInsets.left + parentInsets.right + colCount*w,    	    parentInsets.top + parentInsets.bottom + rowCount*h);    }    // Calculate minimum size as if each component were taking an equal    // share of the width of a row.    public Dimension minimumLayoutSize(Container parent) {    	Insets parentInsets = parent.insets();    	int componentCount = parent.countComponents();    	int rowCount = rows;    	int colCount = cols;    	if (rowCount > 0) {    	    colCount = (componentCount + rowCount - 1) / rowCount;    	} else {    	    rowCount = (componentCount + colCount - 1) / colCount;    	}        // Find the maximum "minimum width" and the maximum "minimum height"        // of any component.    	int w = 0;    	int h = 0;    	for (int i = 0; i < componentCount; i++) {    	    Component comp = parent.getComponent(i);    	    Dimension d = comp.minimumSize();    	    if (w < d.width) {    		    w = d.width;    	    }    	    if (h < d.height) {    		    h = d.height;    	    }    	}    	// Return the maximum "minimum component width and height" times the number    	// of columns and rows, respectively, plus any insets in the parent.    	return new Dimension(parentInsets.left + parentInsets.right + colCount*w,    	    parentInsets.top + parentInsets.bottom + rowCount*h);    }    // Layout the container such that the widths of columns correspond    // to the number of columns in that components hComponentCellWidth    // array element. For example, if the    public void layoutContainer(Container parent) {    	int rowCount = rows;    	int colCount = hComponentCellWidths.length;    	Insets parentInsets = parent.insets();    	int componentCount = parent.countComponents();    	if (componentCount == 0) {    	    return;    	}        // Calculate the width and height of each grid cell. The height will        // be the height of each component, but the width may not. The width        // of a component will be some multiple of a grid cell width. The        // number of grid cells for each component is defined by the        // hComponentCellWidths array. w is width of each grid cell. h is        // height of each grid cell.    	Dimension parentDim = parent.size();    	int w = parentDim.width - (parentInsets.left + parentInsets.right);    	int h = parentDim.height - (parentInsets.top + parentInsets.bottom);    	w /= cols;    	h /= rowCount;        // For each row and column of components (not grid cells) position        // the component.    	for (int c = 0, x = parentInsets.left ; c < colCount ; c++) {    	    for (int r = 0, y = parentInsets.top ; r < rowCount ; r++) {        		int i = r * colCount + c;        		if (i < componentCount) {        		    parent.getComponent(i).reshape(x, y, w * hComponentCellWidths[c], h);        		}        		y += h;    	    }    	    x += (w * hComponentCellWidths[c]);    	}    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品1区二区.| 成年人国产精品| av网站一区二区三区| 欧美一区二区在线播放| 亚洲视频一区在线| 韩国三级在线一区| 欧美日韩精品欧美日韩精品一 | 欧美日韩一区国产| 亚洲国产精品二十页| 日韩精品一级中文字幕精品视频免费观看| 国产 欧美在线| 精品精品国产高清a毛片牛牛| 亚洲永久精品大片| 99精品国产视频| 久久久精品影视| 久久精品二区亚洲w码| 欧美巨大另类极品videosbest | 极品美女销魂一区二区三区免费| 久久精品国产精品亚洲红杏| 中文字幕av一区 二区| av一区二区三区黑人| 99视频一区二区| 久久久99精品免费观看不卡| 蜜臀精品一区二区三区在线观看| 在线观看网站黄不卡| 综合久久综合久久| www.亚洲色图.com| 国产精品麻豆99久久久久久| 国产成人免费视频精品含羞草妖精 | 成人亚洲一区二区一| 欧美成人精品福利| 经典一区二区三区| 中文字幕欧美国产| 国产精品亚洲视频| 国产欧美一区二区精品秋霞影院 | 久久精品日产第一区二区三区高清版| 免费成人深夜小野草| 日韩一级二级三级| 久久99热99| www国产精品av| 国产成人亚洲综合色影视| 中文字幕乱码日本亚洲一区二区| 国产成人午夜视频| 日韩理论片中文av| 色狠狠桃花综合| 午夜精品久久一牛影视| 日韩一区二区三区av| 加勒比av一区二区| 欧美激情一区二区在线| 色视频一区二区| 婷婷国产在线综合| 337p粉嫩大胆色噜噜噜噜亚洲| 国产美女在线精品| 国产精品久久久久久久岛一牛影视| av日韩在线网站| 亚洲制服欧美中文字幕中文字幕| 777午夜精品视频在线播放| 精品写真视频在线观看| 中文字幕视频一区二区三区久| 欧美在线小视频| 黄色成人免费在线| 亚洲女同一区二区| 欧美一级在线视频| 国产成人av一区二区三区在线观看| 综合久久给合久久狠狠狠97色 | 亚洲韩国一区二区三区| 欧美另类videos死尸| 成人国产视频在线观看| 亚洲sss视频在线视频| 久久先锋资源网| 在线一区二区视频| 国产一区不卡视频| 亚洲一级不卡视频| 久久精品人人做| 91精品婷婷国产综合久久性色| 国内精品伊人久久久久影院对白| 亚洲欧美日韩国产另类专区 | 欧美在线小视频| 国产一区二区三区观看| 亚洲一区二区av在线| 国产午夜精品久久久久久久| 欧美日韩精品一二三区| gogogo免费视频观看亚洲一| 美国毛片一区二区| 亚洲午夜在线观看视频在线| 欧美激情一区二区三区全黄| 欧美一区二区高清| 在线观看网站黄不卡| 成人激情综合网站| 精品一区二区三区日韩| 亚洲综合一二区| 国产精品久久福利| 精品国产a毛片| 欧美日韩夫妻久久| 91麻豆蜜桃一区二区三区| 国产精品亚洲一区二区三区在线| 亚洲超丰满肉感bbw| 亚洲免费观看高清完整版在线 | 成人免费观看男女羞羞视频| 日本欧美在线观看| 亚洲午夜精品一区二区三区他趣| 国产欧美日本一区视频| 欧美成人a在线| 欧美剧在线免费观看网站 | 午夜精品久久久久久久久| 国产精品久线在线观看| 久久久精品免费网站| 欧美成人性福生活免费看| 欧美一区二区三区视频在线| 欧美日韩一本到| 91麻豆国产福利在线观看| 成人激情小说网站| 欧美日韩成人在线一区| 欧洲亚洲国产日韩| 在线观看视频一区| 色婷婷亚洲综合| 日本电影亚洲天堂一区| 日本韩国欧美一区| 色哟哟国产精品| 欧美日韩视频专区在线播放| 欧美影院午夜播放| 欧美精品丝袜久久久中文字幕| 欧美视频完全免费看| 欧美日韩另类一区| 欧美精品乱码久久久久久按摩| 欧美高清www午色夜在线视频| 欧美视频日韩视频| 7777精品伊人久久久大香线蕉完整版 | 亚洲国产精品麻豆| 无码av免费一区二区三区试看| 日韩精品亚洲一区二区三区免费| 水蜜桃久久夜色精品一区的特点 | 国产精品99久久久| 成人网在线播放| 色综合一区二区| 欧美日韩精品欧美日韩精品| 日韩免费观看高清完整版在线观看| 日韩欧美国产一区二区在线播放| 亚洲精品一区二区三区影院| 国产清纯白嫩初高生在线观看91 | 一区二区三区精品| 性久久久久久久| 国产一区亚洲一区| 99r精品视频| 欧美精品久久久久久久多人混战| 日韩精品一区二区三区在线播放 | 久久99精品久久久| 成人黄色a**站在线观看| 欧美网站大全在线观看| 欧美一级国产精品| 国产精品久久久久久一区二区三区| 亚洲成人在线免费| 国产乱子伦视频一区二区三区| 色欧美日韩亚洲| 日韩午夜激情av| 国产精品久久看| 美女视频一区二区| 9久草视频在线视频精品| 欧美一区二区日韩| 国产精品女同互慰在线看| 天天综合天天做天天综合| 国产91精品免费| 欧美日韩电影在线播放| 国产欧美日韩在线观看| 一区二区三区高清在线| 国产一区二区三区高清播放| 欧美日韩国产一级二级| 中文字幕乱码日本亚洲一区二区| 日本怡春院一区二区| av亚洲精华国产精华精华| 日韩精品一区二区三区视频在线观看| 国产精品久久久久久久久图文区| 日本成人在线视频网站| 色婷婷精品大在线视频| 日本一区二区三区久久久久久久久不| 亚洲va欧美va天堂v国产综合| 成人三级伦理片| 精品国产欧美一区二区| 天天综合色天天综合| 色婷婷精品久久二区二区蜜臀av| 国产欧美日产一区| 精品一区二区三区视频在线观看| 宅男在线国产精品| 亚洲永久免费av| 色一情一乱一乱一91av| 国产精品女主播av| 福利一区福利二区| 国产视频一区二区三区在线观看| 天天综合天天综合色| 欧美视频一区在线| 亚洲欧美色图小说| a4yy欧美一区二区三区| 国产精品网站一区| 成人深夜在线观看| 国产精品免费人成网站| 国产精品一区二区视频| 欧美精品一区二区精品网| 精品一区二区三区香蕉蜜桃 | 欧美一二三在线| 日韩激情av在线|