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

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

?? rowlayout.java

?? 源碼為Eclipse開(kāi)源開(kāi)發(fā)平臺(tái)桌面開(kāi)發(fā)工具SWT的源代碼,
?? JAVA
字號(hào):
/******************************************************************************* * Copyright (c) 2000, 2004 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Common Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/cpl-v10.html *  * Contributors: *     IBM Corporation - initial API and implementation *******************************************************************************/package org.eclipse.swt.layout;import org.eclipse.swt.*;import org.eclipse.swt.graphics.*;import org.eclipse.swt.widgets.*;/** * Instances of this class determine the size and position of the  * children of a <code>Composite</code> by placing them either in  * horizontal rows or vertical columns within the parent <code>Composite</code>.  * <p> * <code>RowLayout</code> aligns all controls in one row if the * <code>type</code> is set to horizontal, and one column if it is * set to vertical. It has the ability to wrap, and provides configurable  * margins and spacing. <code>RowLayout</code> has a number of configuration  * fields. In addition, the height and width of each control in a  * <code>RowLayout</code> can be specified by setting a <code>RowData</code> * object into the control using <code>setLayoutData ()</code>. * </p> * <p> * The following example code creates a <code>RowLayout</code>, sets all  * of its fields to non-default values, and then sets it into a  * <code>Shell</code>.  * <pre> * 		RowLayout rowLayout = new RowLayout(); * 		rowLayout.wrap = false; * 		rowLayout.pack = false; * 		rowLayout.justify = true; * 		rowLayout.type = SWT.VERTICAL; * 		rowLayout.marginLeft = 5; * 		rowLayout.marginTop = 5; * 		rowLayout.marginRight = 5; * 		rowLayout.marginBottom = 5; * 		rowLayout.spacing = 0; * 		shell.setLayout(rowLayout); * </pre> * If you are using the default field values, you only need one line of code: * <pre> * 		shell.setLayout(new RowLayout()); * </pre> * </p> *  * @see RowData */public final class RowLayout extends Layout {		/**	 * type specifies whether the layout places controls in rows or 	 * columns.	 * 	 * The default value is HORIZONTAL.	 * 	 * Possible values are:	 * 	 * HORIZONTAL: Position the controls horizontally from left to right	 * VERTICAL: Position the controls vertically from top to bottom	 * 	 * @since 2.0	 */	public int type = SWT.HORIZONTAL;		/**	 * marginWidth specifies the number of pixels of horizontal margin	 * that will be placed along the left and right edges of the layout.	 *	 * The default value is 0.	 * 	 * @since 3.0	 */ 	public int marginWidth = 0; 		/**	 * marginHeight specifies the number of pixels of vertical margin	 * that will be placed along the top and bottom edges of the layout.	 *	 * The default value is 0.	 * 	 * @since 3.0	 */ 	public int marginHeight = 0;	/**	 * spacing specifies the number of pixels between the edge of one cell	 * and the edge of its neighbouring cell.	 *	 * The default value is 3.	 */	public int spacing = 3;	 			/**	 * wrap specifies whether a control will be wrapped to the next	 * row if there is insufficient space on the current row.	 *	 * The default value is true.	 */	public boolean wrap = true;	/**	 * pack specifies whether all controls in the layout take	 * their preferred size.  If pack is false, all controls will 	 * have the same size which is the size required to accommodate the 	 * largest preferred height and the largest preferred width of all 	 * the controls in the layout.	 *	 * The default value is true.	 */	public boolean pack = true;		/**	 * fill specifies whether the controls in a row should be	 * all the same height for horizontal layouts, or the same	 * width for vertical layouts.	 *	 * The default value is false.	 * 	 * @since 3.0	 */	public boolean fill = false;	/**	 * justify specifies whether the controls in a row should be	 * fully justified, with any extra space placed between the controls.	 *	 * The default value is false.	 */	public boolean justify = false;	/**	 * marginLeft specifies the number of pixels of horizontal margin	 * that will be placed along the left edge of the layout.	 *	 * The default value is 3.	 */	public int marginLeft = 3;	/**	 * marginTop specifies the number of pixels of vertical margin	 * that will be placed along the top edge of the layout.	 *	 * The default value is 3.	 */	public int marginTop = 3;	/**	 * marginRight specifies the number of pixels of horizontal margin	 * that will be placed along the right edge of the layout.	 *	 * The default value is 3.	 */	public int marginRight = 3;	/**	 * marginBottom specifies the number of pixels of vertical margin	 * that will be placed along the bottom edge of the layout.	 *	 * The default value is 3.	 */	public int marginBottom = 3;/** * Constructs a new instance of this class. */public RowLayout () {}/** * Constructs a new instance of this class given the type. * * @param type the type of row layout *  * @since 2.0 */public RowLayout (int type) {	this.type = type;}protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {	Point extent;	if (type == SWT.HORIZONTAL) {		extent = layoutHorizontal (composite, false, (wHint != SWT.DEFAULT) && wrap, wHint, flushCache);	} else {		extent = layoutVertical (composite, false, (hHint != SWT.DEFAULT) && wrap, hHint, flushCache);	}	if (wHint != SWT.DEFAULT) extent.x = wHint;	if (hHint != SWT.DEFAULT) extent.y = hHint;	return extent;}Point computeSize (Control control, boolean flushCache) {	int wHint = SWT.DEFAULT, hHint = SWT.DEFAULT;	RowData data = (RowData) control.getLayoutData ();	if (data != null) {		wHint = data.width;		hHint = data.height;	}	return control.computeSize (wHint, hHint, flushCache);}protected void layout (Composite composite, boolean flushCache) {	Rectangle clientArea = composite.getClientArea ();	if (type == SWT.HORIZONTAL) {		layoutHorizontal (composite, true, wrap, clientArea.width, flushCache);	} else {		layoutVertical (composite, true, wrap, clientArea.height, flushCache);	}}Point layoutHorizontal (Composite composite, boolean move, boolean wrap, int width, boolean flushCache) {	Control [] children = composite.getChildren ();	int count = children.length;	int childWidth = 0, childHeight = 0, maxHeight = 0;	if (!pack) {		for (int i=0; i<count; i++) {			Control child = children [i];			Point size = computeSize (child, flushCache);			childWidth = Math.max (childWidth, size.x);			childHeight = Math.max (childHeight, size.y);		}		maxHeight = childHeight;	}	int clientX = 0, clientY = 0;	if (move) {		Rectangle rect = composite.getClientArea ();		clientX = rect.x;		clientY = rect.y;	}	int [] wraps = null;	boolean wrapped = false;	Rectangle [] bounds = null;	if (move && (justify || fill)) {		bounds = new Rectangle [count];		wraps = new int [count];	}	int maxX = 0, x = marginLeft + marginWidth, y = marginTop + marginHeight;	for (int i=0; i<count; i++) {		Control child = children [i];		if (pack) {			Point size = computeSize (child, flushCache);			childWidth = size.x;			childHeight = size.y;		}		if (wrap && (i != 0) && (x + childWidth > width)) {			wrapped = true;			if (move && (justify || fill)) wraps [i - 1] = maxHeight;			x = marginLeft + marginWidth;			y += spacing + maxHeight;			if (pack) maxHeight = 0;		}		if (pack || fill) {			maxHeight = Math.max (maxHeight, childHeight);		}		if (move) {			int childX = x + clientX, childY = y + clientY;			if (justify || fill) {				bounds [i] = new Rectangle (childX, childY, childWidth, childHeight);			} else {				child.setBounds (childX, childY, childWidth, childHeight);			}		}		x += spacing + childWidth;		maxX = Math.max (maxX, x);	}	maxX = Math.max (clientX + marginLeft + marginWidth, maxX - spacing);	if (!wrapped) maxX += marginRight + marginWidth;	if (move && (justify || fill)) {		int space = 0, margin = 0;		if (!wrapped) {			space = Math.max (0, (width - maxX) / (count + 1));			margin = Math.max (0, ((width - maxX) % (count + 1)) / 2);		} else {			if (fill || justify) {				int last = 0;				if (count > 0) wraps [count - 1] = maxHeight;				for (int i=0; i<count; i++) {					if (wraps [i] != 0) {						int wrapCount = i - last + 1;						if (justify) {							int wrapX = 0;							for (int j=last; j<=i; j++) {								wrapX += bounds [j].width + spacing;							}							space = Math.max (0, (width - wrapX) / (wrapCount + 1));							margin = Math.max (0, ((width - wrapX) % (wrapCount + 1)) / 2);						}						for (int j=last; j<=i; j++) {							if (justify) bounds [j].x += (space * (j - last + 1)) + margin;							if (fill) bounds [j].height = wraps [i];						}						last = i + 1;					}				}			}		}		for (int i=0; i<count; i++) {			if (!wrapped) {				if (justify) bounds [i].x += (space * (i + 1)) + margin;				if (fill) bounds [i].height = maxHeight;			}			children [i].setBounds (bounds [i]);		}	}	return new Point (maxX, y + maxHeight + marginBottom + marginHeight);}Point layoutVertical (Composite composite, boolean move, boolean wrap, int height, boolean flushCache) {	Control [] children = composite.getChildren ();	int count = children.length;	int childWidth = 0, childHeight = 0, maxWidth = 0;	if (!pack) {		for (int i=0; i<count; i++) {			Control child = children [i];			Point size = computeSize (child, flushCache);			childWidth = Math.max (childWidth, size.x);			childHeight = Math.max (childHeight, size.y);		}		maxWidth = childWidth;	}	int clientX = 0, clientY = 0;	if (move) {		Rectangle rect = composite.getClientArea ();		clientX = rect.x;		clientY = rect.y;	}	int [] wraps = null;	boolean wrapped = false;	Rectangle [] bounds = null;	if (move && (justify || fill)) {		bounds = new Rectangle [count];		wraps = new int [count];	}	int maxY = 0, x = marginLeft + marginWidth, y = marginTop + marginHeight;	for (int i=0; i<count; i++) {		Control child = children [i];		if (pack) {			Point size = computeSize (child, flushCache);			childWidth = size.x;			childHeight = size.y;		}		if (wrap && (i != 0) && (y + childHeight > height)) {			wrapped = true;			if (move && (justify || fill)) wraps [i - 1] = maxWidth;			x += spacing + maxWidth;			y = marginTop + marginHeight;			if (pack) maxWidth = 0;		}		if (pack || fill) {			maxWidth = Math.max (maxWidth, childWidth);		}		if (move) {			int childX = x + clientX, childY = y + clientY;			if (justify || fill) {				bounds [i] = new Rectangle (childX, childY, childWidth, childHeight);			} else {				child.setBounds (childX, childY, childWidth, childHeight);			}		}		y += spacing + childHeight;		maxY = Math.max (maxY, y);	}	maxY = Math.max (clientY + marginTop + marginHeight, maxY - spacing);	if (!wrapped) maxY += marginBottom + marginHeight;	if (move && (justify || fill)) {		int space = 0, margin = 0;		if (!wrapped) {			space = Math.max (0, (height - maxY) / (count + 1));			margin = Math.max (0, ((height - maxY) % (count + 1)) / 2);		} else {			if (fill || justify) {				int last = 0;				if (count > 0) wraps [count - 1] = maxWidth;				for (int i=0; i<count; i++) {					if (wraps [i] != 0) {						int wrapCount = i - last + 1;						if (justify) {							int wrapY = 0;							for (int j=last; j<=i; j++) {								wrapY += bounds [j].height + spacing;							}							space = Math.max (0, (height - wrapY) / (wrapCount + 1));							margin = Math.max (0, ((height - wrapY) % (wrapCount + 1)) / 2);						}						for (int j=last; j<=i; j++) {							if (justify) bounds [j].y += (space * (j - last + 1)) + margin;							if (fill) bounds [j].width = wraps [i];						}						last = i + 1;					}				}			}		}		for (int i=0; i<count; i++) {			if (!wrapped) {				if (justify) bounds [i].y += (space * (i + 1)) + margin;				if (fill) bounds [i].width = maxWidth;			}			children [i].setBounds (bounds [i]);		}	}	return new Point (x + maxWidth + marginRight + marginWidth, maxY);}}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成a人片在线不卡一二三区| 日本美女一区二区| 91精品久久久久久久久99蜜臂| 国产精品123| 无码av中文一区二区三区桃花岛| 国产日韩欧美电影| 日韩欧美国产精品| 在线精品亚洲一区二区不卡| 国产一区二区美女| 午夜精品一区二区三区免费视频| 亚洲国产精品v| 欧美成人福利视频| 欧美日韩日本视频| 色欧美88888久久久久久影院| 国产在线一区二区| 青青草原综合久久大伊人精品| 亚洲欧美成人一区二区三区| 久久久久久久久久久黄色| 欧美一级精品大片| 欧美日韩亚洲综合一区| 色综合天天做天天爱| 国产成人av一区| 精品午夜久久福利影院| 免费高清在线一区| 日韩高清不卡一区| 天堂成人免费av电影一区| 亚洲毛片av在线| 亚洲私人黄色宅男| 中文字幕一区视频| 欧美—级在线免费片| 国产亚洲精品精华液| 久久蜜桃av一区精品变态类天堂 | 欧美日本国产一区| 色婷婷国产精品| 99久久国产综合色|国产精品| 国产不卡免费视频| 成人丝袜18视频在线观看| 国产麻豆一精品一av一免费| 国内精品久久久久影院一蜜桃| 秋霞成人午夜伦在线观看| 亚洲高清中文字幕| 五月婷婷色综合| 视频在线观看一区| 日本亚洲欧美天堂免费| 久久电影网站中文字幕| 国产精品一区二区在线观看网站| 国产精品一区二区三区网站| 粉嫩嫩av羞羞动漫久久久 | 成人动漫在线一区| av在线一区二区三区| 99久久精品国产一区二区三区| 91丨porny丨蝌蚪视频| 日本韩国精品在线| 欧美日韩另类一区| 91精品国产综合久久精品| 日韩欧美国产一区在线观看| 2021久久国产精品不只是精品| 26uuu欧美日本| 中文字幕五月欧美| 亚洲成人av中文| 蜜臂av日日欢夜夜爽一区| 国产东北露脸精品视频| 波多野结衣一区二区三区| 在线精品国精品国产尤物884a| 欧美日韩国产首页在线观看| 精品国产精品网麻豆系列| 中文字幕国产一区二区| 亚洲综合一区二区精品导航| 免费在线成人网| 国产成人免费在线观看不卡| 色一情一乱一乱一91av| 日韩欧美三级在线| 中文字幕亚洲一区二区av在线 | 日本亚洲视频在线| 国产suv一区二区三区88区| 色悠悠久久综合| 91精品国产综合久久精品app| 久久久久亚洲蜜桃| 一区二区三区在线看| 麻豆精品精品国产自在97香蕉| 成人精品国产一区二区4080| 欧美日韩国产a| 国产免费观看久久| 日韩精品成人一区二区在线| 岛国精品在线观看| 欧美一区二区三区在线观看视频 | 欧美优质美女网站| 欧美精品一区二区三区在线播放 | 91一区二区在线| 日韩欧美精品在线| 亚洲品质自拍视频| 国产一区二区三区av电影| 日本高清无吗v一区| 国产婷婷一区二区| 日韩av一级片| 日本韩国欧美在线| 欧美极品另类videosde| 奇米精品一区二区三区在线观看| 91美女蜜桃在线| 久久综合色婷婷| 亚洲成人动漫精品| 91美女片黄在线观看| 久久夜色精品国产噜噜av| 亚洲成人精品影院| 色综合久久综合中文综合网| 久久久久久夜精品精品免费| 日韩电影免费一区| 91福利小视频| 国产精品大尺度| 国产成人免费视频一区| 日韩午夜中文字幕| 亚洲综合色婷婷| 99精品在线观看视频| 日本一区二区视频在线观看| 久久er精品视频| 91精品国产美女浴室洗澡无遮挡| 亚洲精选一二三| 成人国产精品视频| 久久亚洲精华国产精华液| 蜜臀av在线播放一区二区三区 | 中文字幕亚洲成人| 国产91高潮流白浆在线麻豆 | 亚洲一级片在线观看| 99国产欧美久久久精品| 久久久久久久久久久电影| 激情图区综合网| 日韩欧美国产不卡| 久久超碰97人人做人人爱| 欧美成人福利视频| 国产又黄又大久久| 久久久高清一区二区三区| 国产另类ts人妖一区二区| 精品国产乱子伦一区| 国产一区999| 久久久久国产精品厨房| 国产成人综合网站| 国产精品美女www爽爽爽| 99精品黄色片免费大全| 国产精品美女一区二区在线观看| 成人av动漫在线| 中文字幕日韩精品一区| 色婷婷综合久久久中文字幕| 亚洲综合一二区| 欧美日韩精品二区第二页| 亚洲国产精品一区二区久久| 欧美浪妇xxxx高跟鞋交| 日产国产高清一区二区三区 | 精品日韩欧美在线| 国内成人精品2018免费看| 国产视频一区二区在线| 成人动漫一区二区| 一区在线观看视频| 91福利国产精品| 日韩1区2区日韩1区2区| 欧美大片在线观看一区| 国产精品亚洲视频| 国产精品久久久久久久久动漫| 一本久久a久久免费精品不卡| 亚洲一区二区三区四区五区中文| 欧美精品欧美精品系列| 国产精品性做久久久久久| 国产精品福利电影一区二区三区四区 | 国产精品美女一区二区在线观看| 91视视频在线观看入口直接观看www | 国产性做久久久久久| aaa欧美色吧激情视频| 亚洲亚洲精品在线观看| 精品国产自在久精品国产| voyeur盗摄精品| 亚洲国产欧美在线人成| 26uuu亚洲综合色欧美| 日本韩国欧美在线| 精品亚洲成a人| 亚洲主播在线观看| 久久久蜜臀国产一区二区| 在线观看91精品国产入口| 久久精品国产成人一区二区三区 | 99久久久久久99| 免费在线观看日韩欧美| 国产精品女主播av| 91精品视频网| 高清beeg欧美| 日韩一区精品视频| 中文字幕一区二区三区色视频| 在线综合+亚洲+欧美中文字幕| 国产成人免费视| 天堂va蜜桃一区二区三区漫画版| 亚洲国产精品ⅴa在线观看| 欧美日韩黄色影视| 播五月开心婷婷综合| 老司机精品视频在线| 亚洲精品成人悠悠色影视| 久久―日本道色综合久久| 欧美三级电影在线看| 成人免费视频一区二区| 毛片一区二区三区| 亚洲国产精品一区二区久久| 国产精品亲子伦对白| 精品国一区二区三区| 欧美日韩亚洲不卡|