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

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

?? tracker.java

?? 源碼為Eclipse開源開發平臺桌面開發工具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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美综合在线| 亚洲一区二区三区视频在线播放 | 亚洲电影中文字幕在线观看| 久久99久久久欧美国产| 一本久道中文字幕精品亚洲嫩| 欧美不卡一区二区三区| 一区二区三区资源| 成人教育av在线| 久久久不卡影院| 蜜臀av一区二区在线免费观看 | 国产精品综合网| 欧美精品电影在线播放| 亚洲欧美一区二区不卡| 国产精品资源在线观看| 欧美成人女星排行榜| 午夜精品福利一区二区三区av| 国产99精品视频| 精品国产sm最大网站免费看| 午夜影院久久久| 欧美日韩综合不卡| 亚洲精品视频在线观看免费| 丁香婷婷综合网| 久久久亚洲精华液精华液精华液| 蜜臀av一区二区在线免费观看| 欧美日韩午夜精品| 亚洲一区二区四区蜜桃| 一本一道久久a久久精品综合蜜臀| 国产精品午夜免费| 丰满少妇在线播放bd日韩电影| 久久综合九色综合97婷婷| 美日韩一区二区三区| 欧美一级日韩一级| 日韩电影在线免费观看| 91精品免费在线| 三级精品在线观看| 91精品国产91久久久久久一区二区 | 久久久99精品久久| 国产一区免费电影| 久久亚洲捆绑美女| 国模娜娜一区二区三区| 日韩免费电影一区| 日韩和的一区二区| 日韩美女天天操| 伦理电影国产精品| 日韩欧美一卡二卡| 久久99精品一区二区三区| 精品国产一区二区在线观看| 久久99精品久久久久久动态图 | 亚洲欧美日韩国产综合| jlzzjlzz亚洲日本少妇| 亚洲丝袜自拍清纯另类| 99国产精品视频免费观看| 中文字幕综合网| 欧美又粗又大又爽| 视频一区免费在线观看| 欧美videos中文字幕| 国产一区视频在线看| 久久精品人人做人人爽97| 不卡的电影网站| 午夜精品福利一区二区蜜股av| 欧美精品国产精品| 国产伦精一区二区三区| 亚洲你懂的在线视频| 在线观看视频一区| 日本v片在线高清不卡在线观看| 久久久亚洲国产美女国产盗摄| 色一区在线观看| 久久成人麻豆午夜电影| 国产精品丝袜在线| 欧美日韩一区二区三区四区 | 972aa.com艺术欧美| 亚洲成人免费电影| 久久久99精品免费观看不卡| 在线观看日产精品| 国产精品一区二区免费不卡| 亚洲一区av在线| 国产婷婷色一区二区三区四区| 欧美日韩精品电影| 色综合久久天天综合网| 人人爽香蕉精品| 亚洲女厕所小便bbb| 久久久久久久久久久电影| 欧美日韩免费不卡视频一区二区三区| 美女视频免费一区| 亚洲福利视频一区| 国产精品久久久久aaaa| 日韩精品一区二区三区swag | 天天影视网天天综合色在线播放| 精品处破学生在线二十三| 欧美性受xxxx黑人xyx| 国产91精品入口| 六月婷婷色综合| 午夜影视日本亚洲欧洲精品| 亚洲丝袜美腿综合| 中文字幕不卡在线观看| 久久伊人中文字幕| 91精品国产黑色紧身裤美女| 91久久免费观看| 91亚洲永久精品| 成人黄色小视频在线观看| 韩国成人在线视频| 另类人妖一区二区av| 视频一区视频二区中文字幕| 亚洲国产va精品久久久不卡综合| 亚洲素人一区二区| 亚洲欧洲成人av每日更新| 日本一区二区在线不卡| 久久亚洲捆绑美女| www激情久久| xnxx国产精品| 久久精品视频免费| 国产亚洲女人久久久久毛片| 欧美精品一区二| 精品久久人人做人人爽| 久久综合九色综合97婷婷女人| 91精品国产综合久久香蕉麻豆| 欧美军同video69gay| 在线免费观看视频一区| 在线观看区一区二| 在线播放日韩导航| 日韩欧美国产麻豆| 久久九九国产精品| 中文欧美字幕免费| 国产精品三级久久久久三级| 国产精品日韩精品欧美在线| 1024成人网色www| 一区二区三区四区精品在线视频| 亚洲一区在线播放| 日韩av不卡一区二区| 激情图片小说一区| 丁香天五香天堂综合| 欧美在线观看一二区| 欧美午夜电影一区| 日韩视频永久免费| 中文字幕不卡在线播放| 亚洲色图欧洲色图婷婷| 亚洲国产成人av网| 麻豆极品一区二区三区| 成人免费毛片app| 在线观看日韩精品| 欧美videofree性高清杂交| 国产农村妇女毛片精品久久麻豆| 亚洲同性同志一二三专区| 亚洲午夜一区二区| 精品系列免费在线观看| 91在线小视频| 日韩欧美国产电影| 日韩毛片在线免费观看| 日本色综合中文字幕| 成人一区二区三区| 欧美日韩免费一区二区三区| 日韩视频一区二区| 亚洲四区在线观看| 麻豆成人久久精品二区三区红| 成人综合在线网站| 欧美精品一级二级三级| 日本一区二区成人在线| 亚洲成人av一区二区三区| 国产成人综合亚洲网站| 欧美三级乱人伦电影| 日本一区二区三区免费乱视频 | 欧美成人激情免费网| 国产精品久久久爽爽爽麻豆色哟哟| 性感美女久久精品| 91麻豆免费观看| 久久久精品tv| 日韩高清在线不卡| 日本高清不卡aⅴ免费网站| 久久久精品免费网站| 日本伊人色综合网| 91麻豆自制传媒国产之光| 久久无码av三级| 日本va欧美va瓶| 欧美午夜视频网站| 日韩伦理av电影| 丁香婷婷深情五月亚洲| 欧美成人高清电影在线| 爽好多水快深点欧美视频| 在线成人高清不卡| 一区二区欧美精品| 国产成人精品一区二区三区四区 | 91精品国产91久久久久久最新毛片| 成人欧美一区二区三区在线播放| 国内成+人亚洲+欧美+综合在线 | 在线欧美日韩国产| 综合电影一区二区三区| 国产成人啪免费观看软件 | 久久av中文字幕片| 制服丝袜激情欧洲亚洲| 亚洲一区二区高清| 色域天天综合网| 日韩一区中文字幕| av午夜精品一区二区三区| 亚洲国产岛国毛片在线| 国产成人av影院| 久久久久久久久久久久电影| 国产一区二区三区四| 国产视频911| 成人免费观看视频| 欧美国产乱子伦|