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

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

?? tracker.java

?? 源碼為Eclipse開源開發(fā)平臺桌面開發(fā)工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
/******************************************************************************* * 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.widgets; import org.eclipse.swt.internal.*;import org.eclipse.swt.internal.win32.*;import org.eclipse.swt.graphics.*;import org.eclipse.swt.*;import org.eclipse.swt.events.*;/** *  Instances of this class implement rubber banding rectangles that are *  drawn onto a parent <code>Composite</code> or <code>Display</code>. *  These rectangles can be specified to respond to mouse and key events *  by either moving or resizing themselves accordingly.  Trackers are *  typically used to represent window geometries in a lightweight manner. *   * <dl> * <dt><b>Styles:</b></dt> * <dd>LEFT, RIGHT, UP, DOWN, RESIZE</dd> * <dt><b>Events:</b></dt> * <dd>Move, Resize</dd> * </dl> * <p> * Note: Rectangle move behavior is assumed unless RESIZE is specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> */public class Tracker extends Widget {	Control parent;	boolean tracking, stippled;	Rectangle [] rectangles, proportions;	Rectangle bounds;	int resizeCursor, clientCursor, cursorOrientation = SWT.NONE;	boolean inEvent = false;	/*	* The following values mirror step sizes on Windows	*/	final static int STEPSIZE_SMALL = 1;	final static int STEPSIZE_LARGE = 9;/** * Constructs a new instance of this class given its parent * and a style value describing its behavior and appearance. * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this * class, or must be built by <em>bitwise OR</em>'ing together  * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. * Style bits are also inherited from superclasses. * </p> * * @param parent a widget which will be the parent of the new instance (cannot be null) * @param style the style of widget to construct * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the parent is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> * * @see SWT#LEFT * @see SWT#RIGHT * @see SWT#UP * @see SWT#DOWN * @see SWT#RESIZE * @see Widget#checkSubclass * @see Widget#getStyle */public Tracker (Composite parent, int style) {	super (parent, checkStyle (style));	this.parent = parent;}/** * Constructs a new instance of this class given the display * to create it on and a style value describing its behavior * and appearance. * <p> * The style value is either one of the style constants defined in * class <code>SWT</code> which is applicable to instances of this * class, or must be built by <em>bitwise OR</em>'ing together  * (that is, using the <code>int</code> "|" operator) two or more * of those <code>SWT</code> style constants. The class description * lists the style constants that are applicable to the class. * Style bits are also inherited from superclasses. * </p><p> * Note: Currently, null can be passed in for the display argument. * This has the effect of creating the tracker on the currently active * display if there is one. If there is no current display, the  * tracker is created on a "default" display. <b>Passing in null as * the display argument is not considered to be good coding style, * and may not be supported in a future release of SWT.</b> * </p> * * @param display the display to create the tracker on * @param style the style of control to construct * * @exception SWTException <ul> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent</li> *    <li>ERROR_INVALID_SUBCLASS - if this class is not an allowed subclass</li> * </ul> *  * @see SWT#LEFT * @see SWT#RIGHT * @see SWT#UP * @see SWT#DOWN */public Tracker (Display display, int style) {	if (display == null) display = Display.getCurrent ();	if (display == null) display = Display.getDefault ();	if (!display.isValidThread ()) {		error (SWT.ERROR_THREAD_INVALID_ACCESS);	}	this.style = checkStyle (style);	this.display = display;}/** * Adds the listener to the collection of listeners who will * be notified when the control is moved or resized, by sending * it one of the messages defined in the <code>ControlListener</code> * interface. * * @param listener the listener which should be notified * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the listener is null</li> * </ul> * @exception SWTException <ul> *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @see ControlListener * @see #removeControlListener */public void addControlListener (ControlListener listener) {	checkWidget ();	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);	TypedListener typedListener = new TypedListener (listener);	addListener (SWT.Resize, typedListener);	addListener (SWT.Move, typedListener);}Point adjustMoveCursor () {	int newX = bounds.x + bounds.width / 2;	int newY = bounds.y;	POINT pt = new POINT ();	pt.x = newX;  pt.y = newY;	/*	 * Convert to screen coordinates iff needed 	 */	if (parent != null) {		OS.ClientToScreen (parent.handle, pt);	}	OS.SetCursorPos (pt.x, pt.y);	return new Point (pt.x, pt.y);}Point adjustResizeCursor () {	int newX, newY;	if ((cursorOrientation & SWT.LEFT) != 0) {		newX = bounds.x;	} else if ((cursorOrientation & SWT.RIGHT) != 0) {		newX = bounds.x + bounds.width;	} else {		newX = bounds.x + bounds.width / 2;	}	if ((cursorOrientation & SWT.UP) != 0) {		newY = bounds.y;	} else if ((cursorOrientation & SWT.DOWN) != 0) {		newY = bounds.y + bounds.height;	} else {		newY = bounds.y + bounds.height / 2;	}	POINT pt = new POINT ();	pt.x = newX;  pt.y = newY;	/*	 * Convert to screen coordinates iff needed	 */	if (parent != null) {		OS.ClientToScreen (parent.handle, pt);	}	OS.SetCursorPos (pt.x, pt.y);	/*	* If the client has not provided a custom cursor then determine	* the appropriate resize cursor.	*/	if (clientCursor == 0) {		int newCursor = 0;		switch (cursorOrientation) {			case SWT.UP:				newCursor = OS.LoadCursor (0, OS.IDC_SIZENS);				break;			case SWT.DOWN:				newCursor = OS.LoadCursor (0, OS.IDC_SIZENS);				break;			case SWT.LEFT:				newCursor = OS.LoadCursor (0, OS.IDC_SIZEWE);				break;			case SWT.RIGHT:				newCursor = OS.LoadCursor (0, OS.IDC_SIZEWE);				break;			case SWT.LEFT | SWT.UP:				newCursor = OS.LoadCursor (0, OS.IDC_SIZENWSE);				break;			case SWT.RIGHT | SWT.DOWN:				newCursor = OS.LoadCursor (0, OS.IDC_SIZENWSE);				break;			case SWT.LEFT | SWT.DOWN:				newCursor = OS.LoadCursor (0, OS.IDC_SIZENESW);				break;			case SWT.RIGHT | SWT.UP:				newCursor = OS.LoadCursor (0, OS.IDC_SIZENESW);				break;			default:				newCursor = OS.LoadCursor (0, OS.IDC_SIZEALL);				break;		}		OS.SetCursor (newCursor);		if (resizeCursor != 0) {			OS.DestroyCursor (resizeCursor);		}		resizeCursor = newCursor;	}			return new Point (pt.x, pt.y);}static int checkStyle (int style) {	if ((style & (SWT.LEFT | SWT.RIGHT | SWT.UP | SWT.DOWN)) == 0) {		style |= SWT.LEFT | SWT.RIGHT | SWT.UP | SWT.DOWN;	}	return style;}/** * Stops displaying the tracker rectangles.  Note that this is not considered * to be a cancelation by the user. * * @exception SWTException <ul> *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */public void close () {	checkWidget ();	tracking = false;}Rectangle computeBounds () {	int xMin = rectangles [0].x;	int yMin = rectangles [0].y;	int xMax = rectangles [0].x + rectangles [0].width;	int yMax = rectangles [0].y + rectangles [0].height;		for (int i = 1; i < rectangles.length; i++) {		if (rectangles [i].x < xMin) xMin = rectangles [i].x;		if (rectangles [i].y < yMin) yMin = rectangles [i].y;		int rectRight = rectangles [i].x + rectangles [i].width;		if (rectRight > xMax) xMax = rectRight;				int rectBottom = rectangles [i].y + rectangles [i].height;		if (rectBottom > yMax) yMax = rectBottom;	}		return new Rectangle (xMin, yMin, xMax - xMin, yMax - yMin);}Rectangle [] computeProportions (Rectangle [] rects) {	Rectangle [] result = new Rectangle [rects.length];	bounds = computeBounds ();	for (int i = 0; i < rects.length; i++) {		int x = 0, y = 0, width = 0, height = 0;		if (bounds.width != 0) {			x = (rects [i].x - bounds.x) * 100 / bounds.width;			width = rects [i].width * 100 / bounds.width;		} else {			width = 100;		}		if (bounds.height != 0) {			y = (rects [i].y - bounds.y) * 100 / bounds.height;			height = rects [i].height * 100 / bounds.height;		} else {			height = 100;		}		result [i] = new Rectangle (x, y, width, height);				}	return result;}/** * Draw the rectangles displayed by the tracker. */void drawRectangles (Rectangle [] rects, boolean stippled) {	if (parent != null) {		if (parent.isDisposed ()) return;		Shell shell = parent.getShell ();		shell.update (true);	} else {		display.update ();	}	int bandWidth = 1;	int hwndTrack = OS.GetDesktopWindow ();	if (parent != null) hwndTrack = parent.handle;	int hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);	int hBitmap = 0, hBrush = 0, oldBrush = 0;

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩视频免费观看高清完整版在线观看| 精品国精品自拍自在线| 欧美视频一区在线观看| 久久精品一区二区| 亚洲高清不卡在线观看| 成人免费视频一区| 在线不卡一区二区| 一区二区在线电影| 成人午夜视频福利| 日韩精品一区二区三区在线观看| 亚洲色图一区二区| 国产精品亚洲成人| 日韩亚洲欧美一区| 亚洲国产人成综合网站| 99精品国产99久久久久久白柏| 欧美日韩久久久| 99re66热这里只有精品3直播 | 99国产精品久久久久久久久久| 日韩欧美在线影院| 亚洲精品国产一区二区精华液| 国产v综合v亚洲欧| 欧美精品一区二区在线播放| 久久精品国产99久久6| 欧美群妇大交群中文字幕| 亚洲一区二区三区爽爽爽爽爽| eeuss影院一区二区三区| 欧美极品aⅴ影院| 国产精品 日产精品 欧美精品| 精品国产一区二区三区久久影院| 中文字幕一区免费在线观看| 玉足女爽爽91| 欧美三级中文字幕| 亚洲国产视频一区二区| 欧美日韩亚洲综合在线| 亚洲chinese男男1069| 欧美日韩国产a| 天天爽夜夜爽夜夜爽精品视频| 欧美日韩中文字幕一区| 污片在线观看一区二区| 538prom精品视频线放| 蜜臀av性久久久久蜜臀aⅴ| 日韩三级免费观看| 国产精品久久影院| 99久久夜色精品国产网站| 亚洲日本免费电影| 欧美日韩一区二区在线观看视频| 午夜伦欧美伦电影理论片| 日韩视频永久免费| 国产精品一级黄| 亚洲日本丝袜连裤袜办公室| 欧美中文字幕一区| 麻豆国产91在线播放| 国产亚洲一区二区三区| 91亚洲国产成人精品一区二区三| 一区二区视频在线看| 日韩一区二区三区在线| 国产成人精品免费视频网站| 亚洲女与黑人做爰| 日韩视频免费直播| 成人黄色综合网站| 三级久久三级久久| √…a在线天堂一区| 午夜激情综合网| 久久精品欧美一区二区三区不卡| 99久久久免费精品国产一区二区| 亚洲国产一区二区视频| 久久九九国产精品| 欧美色偷偷大香| 国产乱一区二区| 一区2区3区在线看| 久久久精品天堂| 欧美日韩激情一区二区| 国产盗摄一区二区三区| 午夜精品成人在线视频| 中文字幕av在线一区二区三区| 欧美日韩一级二级| 99re66热这里只有精品3直播| 麻豆精品国产传媒mv男同| 亚洲欧美成aⅴ人在线观看| 久久嫩草精品久久久精品| 欧美午夜视频网站| 99精品视频中文字幕| 精一区二区三区| 亚洲综合激情网| 国产精品国产三级国产a| 亚洲精品在线电影| 91精品黄色片免费大全| 91久久奴性调教| 不卡的av在线| 国产成人福利片| 国产一区在线观看视频| 日韩精品电影在线| 亚洲一区二区三区美女| 国产精品久久久爽爽爽麻豆色哟哟| 91精品国产综合久久香蕉麻豆 | 蜜桃av噜噜一区| 男人的天堂亚洲一区| 欧美在线影院一区二区| 菠萝蜜视频在线观看一区| 国产在线日韩欧美| 美女视频免费一区| 日韩av在线发布| 亚洲高清三级视频| 亚洲黄色小说网站| 亚洲精品高清在线| 亚洲欧美日韩在线播放| **欧美大码日韩| 一区视频在线播放| 亚洲色图.com| 中文字幕欧美日本乱码一线二线 | 久久成人免费日本黄色| 天天操天天色综合| 日本午夜一区二区| 免费欧美日韩国产三级电影| 丝瓜av网站精品一区二区| 亚洲一区在线观看网站| 亚洲成av人**亚洲成av**| 亚洲高清免费观看高清完整版在线观看| 樱花影视一区二区| 午夜影院在线观看欧美| 日韩精品一区第一页| 日韩不卡免费视频| 精品综合免费视频观看| 国产91高潮流白浆在线麻豆| 丁香激情综合国产| 97久久精品人人做人人爽| 在线视频欧美区| 欧美高清激情brazzers| 日韩精品自拍偷拍| 国产亚洲午夜高清国产拍精品| 欧美激情一区二区三区全黄| 亚洲欧洲日产国码二区| 亚洲成人免费电影| 久久精品国产99| 国产 日韩 欧美大片| 色婷婷久久久综合中文字幕 | 婷婷中文字幕一区三区| 日产精品久久久久久久性色| 精品综合免费视频观看| 成人动漫一区二区| 精品视频在线免费看| 日韩丝袜美女视频| 国产精品丝袜一区| 一区二区在线观看av| 久久精品国产亚洲高清剧情介绍| 成人免费毛片高清视频| 欧美午夜电影网| 精品国产乱码久久久久久老虎| 国产精品女同一区二区三区| 亚洲主播在线播放| 国产主播一区二区三区| 色播五月激情综合网| 日韩美女视频一区二区在线观看| 国产精品久久久久三级| 波多野结衣一区二区三区| 欧美三级日韩在线| 国产婷婷色一区二区三区在线| 亚洲永久精品大片| 国产精品一区二区三区四区| 欧美色男人天堂| 久久精品在线免费观看| 亚洲成人精品在线观看| 国产不卡视频在线观看| 制服丝袜激情欧洲亚洲| 日韩美女视频一区| 国产真实乱对白精彩久久| 欧美午夜宅男影院| 国产精品大尺度| 国产美女视频91| 3d动漫精品啪啪1区2区免费| 亚洲视频资源在线| 国产麻豆精品95视频| 91麻豆精品国产91久久久资源速度| 中文字幕不卡一区| 国产精品123| 精品日韩一区二区| 日韩精品电影一区亚洲| 色婷婷久久久亚洲一区二区三区| 国产欧美一区二区精品性色 | 亚洲电影在线播放| 99久久久免费精品国产一区二区| 久久久亚洲综合| 麻豆极品一区二区三区| 欧美日韩一二三| 亚洲一区二区三区自拍| 91在线精品一区二区| 亚洲国产精品成人综合| 国产电影一区二区三区| 久久伊人蜜桃av一区二区| 美女脱光内衣内裤视频久久影院| 欧美日韩一区二区三区免费看| 亚洲男同性视频| 91啪亚洲精品| 亚洲丝袜美腿综合| 色综合久久综合网| 亚洲美腿欧美偷拍| 在线亚洲+欧美+日本专区| 亚洲一区在线播放| 欧美午夜影院一区| 午夜精品在线视频一区|