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

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

?? formattachment.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
字號:
/******************************************************************************* * 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.widgets.*;/** * Instances of this class are used to define the edges of a control * within a <code>FormLayout</code>.  * <p> * <code>FormAttachments</code> are set into the top, bottom, left, * and right fields of the <code>FormData</code> for a control. * For example: * <pre> * 		FormData data = new FormData(); * 		data.top = new FormAttachment(0,5); * 		data.bottom = new FormAttachment(100,-5); * 		data.left = new FormAttachment(0,5); * 		data.right = new FormAttachment(100,-5); * 		button.setLayoutData(data); * </pre> * </p> * <p> * A <code>FormAttachment</code> defines where to attach the side of * a control by using the equation, y = ax + b. The "a" term represents  * a fraction of the parent composite's width (from the left) or height * (from the top). It can be defined using a numerator and denominator, * or just a percentage value. If a percentage is used, the denominator  * is set to 100. The "b" term in the equation represents an offset, in * pixels, from the attachment position. For example: * <pre> * 		FormAttachment attach = new FormAttachment (20, -5); * </pre> * specifies that the side to which the <code>FormAttachment</code> * object belongs will lie at 20% of the parent composite, minus 5 pixels. * </p> * <p> * Control sides can also be attached to another control. * For example: * <pre> * 		FormAttachment attach = new FormAttachment (button, 10); * </pre> * specifies that the side to which the <code>FormAttachment</code> * object belongs will lie in the same position as the adjacent side of  * the <code>button</code> control, plus 10 pixels. The control side can  * also be attached to the opposite side of the specified control. * For example: * <pre> * 		FormData data = new FormData (); * 		data.left = new FormAttachment (button, 0, SWT.LEFT); * </pre> * specifies that the left side of the control will lie in the same position * as the left side of the <code>button</code> control. The control can also  * be attached in a position that will center the control on the specified  * control. For example: * <pre> * 		data.left = new FormAttachment (button, 0, SWT.CENTER); * </pre> * specifies that the left side of the control will be positioned so that it is * centered between the left and right sides of the <code>button</code> control. * If the alignment is not specified, the default is to attach to the adjacent side. * </p> *  * @see FormLayout * @see FormData *  * @since 2.0 */public final class FormAttachment {	/**	 * numerator specifies the numerator of the "a" term in the	 * equation, y = ax + b, which defines the attachment.	 */	public int numerator;	/**	 * denominator specifies the denominator of the "a" term in the	 * equation, y = ax + b, which defines the attachment.	 * 	 * The default value is 100.	 */	public int denominator = 100;	/**	 * offset specifies the offset, in pixels, of the control side	 * from the attachment position.	 * If the offset is positive, then the control side is offset	 * to the right of or below the attachment position. If it is	 * negative, then the control side is offset to the left of or	 * above the attachment position.	 * 	 * This is equivalent to the "b" term in the equation y = ax + b.	 * The default value is 0.	 */	public int offset;	/**	 * control specifies the control to which the control side is	 * attached.	 */	public Control control;	/**	 * alignment specifies the alignment of the control side that is	 * attached to a control.	 * For top and bottom attachments, TOP, BOTTOM and CENTER are used. For left 	 * and right attachments, LEFT, RIGHT and CENTER are used. If any other case	 * occurs, the default will be used instead.	 * 	 * Possible values are:	 * 	 * TOP: Attach the side to the top side of the specified control.	 * BOTTOM : Attach the side to the bottom side of the specified control.	 * LEFT: Attach the side to the left side of the specified control.	 * RIGHT: Attach the side to the right side of the specified control.	 * CENTER: Attach the side at a position which will center the control on	 * the specified control.	 * DEFAULT: Attach the side to the adjacent side of the specified control.	 */	public int alignment;	FormAttachment () {}/** * Constructs a new instance of this class given a numerator * Since no denominator or offset is specified, the default * is to treat the numerator as a percentage of the form, with a  * denominator of 100. The offset is zero. *  * @param numerator the percentage of the position * @param offset the offset of the side from the position *  * @since 3.0 */public FormAttachment (int numerator) {	this (numerator, 100, 0);}/** * Constructs a new instance of this class given a numerator * and an offset. Since no denominator is specified, the default * is to treat the numerator as a percentage of the form, with a  * denominator of 100. *  * @param numerator the percentage of the position * @param offset the offset of the side from the position */public FormAttachment (int numerator, int offset) {	this (numerator, 100, offset);}/** * Constructs a new instance of this class given a numerator  * and denominator and an offset. The position of the side is * given by the fraction of the form defined by the numerator * and denominator. * * @param numerator the numerator of the position * @param denominator the denominator of the position * @param offset the offset of the side from the position */public FormAttachment (int numerator, int denominator, int offset) {	if (denominator == 0) SWT.error (SWT.ERROR_CANNOT_BE_ZERO);	this.numerator = numerator;	this.denominator = denominator;	this.offset = offset;}/** * Constructs a new instance of this class given a control. * Since no alignment is specified, the default alignment is * to attach the side to the adjacent side of the specified  * control. Since no offset is specified, an offset of 0 is * used. *  * @param control the control the side is attached to */public FormAttachment (Control control) {	this (control, 0, SWT.DEFAULT);}/** * Constructs a new instance of this class given a control * and an offset. Since no alignment is specified, the default * alignment is to attach the side to the adjacent side of the  * specified control. *  * @param control the control the side is attached to * @param offset the offset of the side from the control */public FormAttachment (Control control, int offset) {	this (control, offset, SWT.DEFAULT);}/** * Constructs a new instance of this class given a control, * an offset and an alignment. *  * @param control the control the side is attached to * @param offset the offset of the side from the control * @param alignment the alignment of the side to the control it is attached to */public FormAttachment (Control control, int offset, int alignment) {	this.control = control;	this.offset = offset;	this.alignment = alignment;}FormAttachment divide (int value) {	return new FormAttachment (numerator, denominator * value, offset / value);}int gcd (int m, int n) {	int temp;	m = Math.abs (m);	n = Math.abs (n);	if (m < n) {		temp = m;		m = n;		n = temp;	}	while (n != 0){		temp = m;		m = n;		n = temp % n;	}	return m;}FormAttachment minus (FormAttachment attachment) {	FormAttachment solution = new FormAttachment ();	solution.numerator = numerator * attachment.denominator - denominator * attachment.numerator;	solution.denominator = denominator * attachment.denominator;	int gcd = gcd (solution.denominator, solution.numerator);	solution.numerator = solution.numerator / gcd;	solution.denominator = solution.denominator / gcd;	solution.offset = offset - attachment.offset;	return solution;}FormAttachment minus (int value) {	return new FormAttachment (numerator, denominator, offset - value);}FormAttachment plus (FormAttachment attachment) {	FormAttachment solution = new FormAttachment ();	solution.numerator = numerator * attachment.denominator + denominator * attachment.numerator;	solution.denominator = denominator * attachment.denominator;	int gcd = gcd (solution.denominator, solution.numerator);	solution.numerator = solution.numerator / gcd;	solution.denominator = solution.denominator / gcd;	solution.offset = offset + attachment.offset;	return solution;}FormAttachment plus (int value) {	return new FormAttachment (numerator, denominator, offset + value);}int solveX (int value) {	if (denominator == 0) SWT.error (SWT.ERROR_CANNOT_BE_ZERO);	return ((numerator * value) / denominator) + offset;}int solveY (int value) {	if (numerator == 0) SWT.error (SWT.ERROR_CANNOT_BE_ZERO);	return (value - offset) * denominator / numerator;}	public String toString () { 	String string = control != null ? control.toString () : numerator + "/" + denominator;	return "y = (" + string + (offset >= 0 ? ")x + " + offset: ")x - " + (-offset));}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品天干天干在线综合| 国产精品美女久久久久高潮| 国产精品短视频| 一区二区三区在线视频观看58| 日韩精品免费视频人成| 成人v精品蜜桃久久一区| 欧美日韩一区二区三区在线| 久久久国产午夜精品| 亚洲成a人片综合在线| 国产自产v一区二区三区c| 欧美视频精品在线| 欧美国产日产图区| 亚洲综合久久av| 99riav一区二区三区| 日韩欧美国产综合一区| 五月综合激情日本mⅴ| 成人精品高清在线| 欧美久久一二区| 一区二区三区精品视频在线| 国产精品一品视频| 精品区一区二区| 亚洲电影一区二区三区| 国产一区久久久| 欧美tk—视频vk| 午夜欧美电影在线观看| 欧美影片第一页| 亚洲天堂网中文字| 91丝袜高跟美女视频| 国产调教视频一区| 精品一区二区成人精品| 精品美女一区二区| 美国十次了思思久久精品导航| 欧美日韩免费不卡视频一区二区三区| 中文字幕精品三区| 国产精品一区免费在线观看| 久久久久久久综合色一本| 日本不卡一区二区三区高清视频| 欧美猛男超大videosgay| 一区二区三区视频在线看| 成人av电影在线观看| 日韩理论电影院| 99久久精品免费看国产| 中文字幕亚洲精品在线观看| 麻豆一区二区三| 日韩精品一区二区三区四区视频| 亚洲国产综合91精品麻豆| 欧美色精品在线视频| 亚洲v中文字幕| 欧美一区日本一区韩国一区| 性欧美疯狂xxxxbbbb| 欧美日韩一区二区三区不卡| 青青草91视频| 久久老女人爱爱| 成人激情午夜影院| 亚洲欧洲精品一区二区精品久久久 | 精品国产麻豆免费人成网站| 亚洲成人一区二区在线观看| 精品国产百合女同互慰| 国产一区二区三区观看| 亚洲精品成a人| 欧美日韩精品电影| 国产精品1区2区3区| 中文字幕一区二区三区色视频| 成人午夜免费av| 亚洲午夜激情av| 91精品在线观看入口| 成人丝袜高跟foot| 亚洲精品久久久久久国产精华液| 欧美一区二区在线看| 国产伦精品一区二区三区在线观看| 久久精品日产第一区二区三区高清版 | 亚洲欧洲av色图| 色网站国产精品| 午夜精彩视频在线观看不卡| 欧美国产乱子伦| 91成人在线免费观看| 国产成人综合在线| 亚洲黄色免费网站| 99久久99久久精品国产片果冻 | 亚洲va国产天堂va久久en| 欧美日本不卡视频| 狠狠色丁香久久婷婷综| 国产精品私人自拍| 欧美丰满一区二区免费视频| 国产伦精一区二区三区| 亚洲午夜久久久久久久久电影网| 69堂亚洲精品首页| 白白色 亚洲乱淫| 亚洲二区在线视频| 亚洲精品久久久久久国产精华液| 日韩一区二区视频在线观看| 欧洲一区二区三区免费视频| 久久99精品久久久久久久久久久久| 一区二区三区欧美激情| 久久久不卡影院| 欧美日韩国产色站一区二区三区| 97精品久久久午夜一区二区三区| 日韩国产欧美三级| 亚洲一区二区欧美激情| 国产精品久久午夜夜伦鲁鲁| 欧美三级一区二区| 91麻豆国产香蕉久久精品| 裸体健美xxxx欧美裸体表演| 三级亚洲高清视频| 亚洲视频在线一区| 亚洲色图欧洲色图婷婷| 国产欧美一区二区三区沐欲 | 国产亚洲污的网站| 91精品国模一区二区三区| 岛国精品在线播放| 成人精品视频一区二区三区尤物| 蜜桃久久久久久| 美女一区二区久久| 天天综合网 天天综合色| 亚洲精品乱码久久久久| 精品国产乱码久久久久久浪潮 | 色婷婷av一区二区三区软件 | 精品视频在线免费观看| eeuss鲁片一区二区三区在线看| 成人中文字幕合集| 国产成人免费视频一区| 国产在线精品不卡| 国产成人精品免费网站| 国产精品亚洲一区二区三区妖精 | jvid福利写真一区二区三区| 国产精品888| 97aⅴ精品视频一二三区| www.成人在线| 在线亚洲一区观看| 欧美日韩国产高清一区二区 | 精品一区二区在线视频| 国内精品第一页| 久久精品国产999大香线蕉| 国产乱码精品一区二区三区五月婷| 蜜臀精品一区二区三区在线观看| 亚洲综合丁香婷婷六月香| 亚洲成精国产精品女| 日本vs亚洲vs韩国一区三区二区| 国产又黄又大久久| 成人免费视频一区二区| 欧美亚洲一区二区在线| 欧美精品一二三| 国产性色一区二区| 最新国产精品久久精品| 首页国产丝袜综合| 久久99国产精品久久99| 成人天堂资源www在线| 色综合网站在线| 欧美成人aa大片| 中文字幕在线不卡| 亚洲美女在线一区| 激情文学综合网| 成人高清av在线| 91麻豆精品国产91久久久更新时间| 日韩三级免费观看| 综合在线观看色| 视频一区二区欧美| 色综合久久综合网| 91精品国产日韩91久久久久久| 国产三级欧美三级| 亚洲福利视频三区| 日本亚洲最大的色成网站www| 成人黄色综合网站| 欧美精品在线一区二区三区| 国产精品美女久久久久久久| 亚洲福利国产精品| 91在线无精精品入口| 4438x亚洲最大成人网| 最新国产精品久久精品| 视频一区二区中文字幕| 国产一区二区精品久久99| 欧美亚洲日本国产| 日韩亚洲欧美综合| 视频在线观看一区二区三区| 国产精品一区二区男女羞羞无遮挡| 欧美蜜桃一区二区三区| 亚洲欧洲精品一区二区精品久久久| 精品一区二区在线观看| 欧美中文字幕一区二区三区亚洲| 久久精品视频在线看| 日韩av在线发布| 91视频www| 91精品国产综合久久国产大片| 亚洲人成亚洲人成在线观看图片 | 国产精品久久久久9999吃药| 日韩影院免费视频| 欧美日韩不卡在线| 亚洲色图制服丝袜| www.亚洲在线| 国产三级欧美三级日产三级99| 日韩av一区二区三区四区| 欧美性一二三区| 国产三级精品在线| 国产河南妇女毛片精品久久久| 精品视频一区三区九区| 亚洲一区二区三区影院| 色综合久久综合网欧美综合网| 亚洲免费电影在线| 91小视频在线| 亚洲免费观看在线观看|