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

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

?? sash.java

?? 源碼為Eclipse開源開發(fā)平臺桌面開發(fā)工具SWT的源代碼,
?? JAVA
字號:
/******************************************************************************* * Copyright (c) 2000, 2003 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.win32.*;import org.eclipse.swt.*;import org.eclipse.swt.graphics.*;import org.eclipse.swt.events.*;/** * Instances of the receiver represent a selectable user interface object * that allows the user to drag a rubber banded outline of the sash within * the parent control. * <dl> * <dt><b>Styles:</b></dt> * <dd>HORIZONTAL, VERTICAL</dd> * <dt><b>Events:</b></dt> * <dd>Selection</dd> * </dl> * <p> * Note: Only one of the styles HORIZONTAL and VERTICAL may be specified. * </p><p> * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> */public class Sash extends Control {	boolean dragging;	int startX, startY, lastX, lastY;	final static int INCREMENT = 1;	final static int PAGE_INCREMENT = 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 composite control which will be the parent of the new instance (cannot be null) * @param style the style of control 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#HORIZONTAL * @see SWT#VERTICAL * @see Widget#checkSubclass * @see Widget#getStyle */public Sash (Composite parent, int style) {	super (parent, checkStyle (style));}/** * Adds the listener to the collection of listeners who will * be notified when the control is selected, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the x, y, width, and height fields of the event object are valid. * If the reciever is being dragged, the event object detail field contains the value <code>SWT.DRAG</code>. * <code>widgetDefaultSelected</code> is not called. * </p> * * @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 SelectionListener * @see #removeSelectionListener * @see SelectionEvent */public void addSelectionListener (SelectionListener listener) {	checkWidget ();	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);	TypedListener typedListener = new TypedListener (listener);	addListener (SWT.Selection,typedListener);	addListener (SWT.DefaultSelection,typedListener);}int callWindowProc (int msg, int wParam, int lParam) {	if (handle == 0) return 0;	return OS.DefWindowProc (handle, msg, wParam, lParam);}static int checkStyle (int style) {	return checkBits (style, SWT.HORIZONTAL, SWT.VERTICAL, 0, 0, 0, 0);}public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget ();	int border = getBorderWidth ();	int width = border * 2, height = border * 2;	if ((style & SWT.HORIZONTAL) != 0) {		width += DEFAULT_WIDTH;  height += 3;	} else {		width += 3; height += DEFAULT_HEIGHT;	}	if (wHint != SWT.DEFAULT) width = wHint + (border * 2);	if (hHint != SWT.DEFAULT) height = hHint + (border * 2);	return new Point (width, height);}void drawBand (int x, int y, int width, int height) {	int hwndTrack = parent.handle;	byte [] bits = {-86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0, -86, 0, 85, 0};	int stippleBitmap = OS.CreateBitmap (8, 8, 1, 1, bits);	int stippleBrush = OS.CreatePatternBrush (stippleBitmap);	int hDC = OS.GetDCEx (hwndTrack, 0, OS.DCX_CACHE);	int oldBrush = OS.SelectObject (hDC, stippleBrush);	OS.PatBlt (hDC, x, y, width, height, OS.PATINVERT);	OS.SelectObject (hDC, oldBrush);	OS.ReleaseDC (hwndTrack, hDC);	OS.DeleteObject (stippleBrush);	OS.DeleteObject (stippleBitmap);}/** * Removes the listener from the collection of listeners who will * be notified when the control is selected. * * @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 SelectionListener * @see #addSelectionListener */public void removeSelectionListener(SelectionListener listener) {	checkWidget ();	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);	if (eventTable == null) return;	eventTable.unhook (SWT.Selection, listener);	eventTable.unhook (SWT.DefaultSelection,listener);	}TCHAR windowClass () {	return display.windowClass;}int windowProc () {	return display.windowProc;}LRESULT WM_ERASEBKGND (int wParam, int lParam) {	LRESULT result = super.WM_ERASEBKGND (wParam, lParam);	if (result != null) return result;	drawBackground (wParam);	return LRESULT.ONE;}LRESULT WM_KEYDOWN (int wParam, int lParam) {	LRESULT result = super.WM_KEYDOWN (wParam, lParam);	if (result != null) return result;	switch (wParam) {		case OS.VK_LEFT:		case OS.VK_RIGHT:		case OS.VK_UP:		case OS.VK_DOWN:						/* Calculate the new x or y position */			if (OS.GetKeyState (OS.VK_LBUTTON) < 0) return result;			int step = OS.GetKeyState (OS.VK_CONTROL) < 0 ? INCREMENT : PAGE_INCREMENT;			POINT pt = new POINT ();			if ((style & SWT.VERTICAL) != 0) {				if (wParam == OS.VK_UP || wParam == OS.VK_DOWN) break;				pt.x = wParam == OS.VK_LEFT ? -step : step;			} else {				if (wParam == OS.VK_LEFT || wParam == OS.VK_RIGHT) break;				pt.y = wParam == OS.VK_UP ? -step : step;			}			int hwndTrack = parent.handle;			OS.MapWindowPoints (handle, hwndTrack, pt, 1);			RECT rect = new RECT (), clientRect = new RECT ();			OS.GetWindowRect (handle, rect);			int width = rect.right - rect.left;			int height = rect.bottom - rect.top;			OS.GetClientRect (hwndTrack, clientRect);			int clientWidth = clientRect.right - clientRect.left;			int clientHeight = clientRect.bottom - clientRect.top;			int newX = lastX, newY = lastY;			if ((style & SWT.VERTICAL) != 0) {				newX = Math.min (Math.max (0, pt.x - startX), clientWidth - width);			} else {				newY = Math.min (Math.max (0, pt.y - startY), clientHeight - height);			}			if (newX == lastX && newY == lastY) return result;			/* Update the pointer position */			POINT cursorPt = new POINT ();			cursorPt.x = pt.x;  cursorPt.y = pt.y;			OS.ClientToScreen (hwndTrack, cursorPt);			if ((style & SWT.VERTICAL) != 0) {				cursorPt.y += height / 2;			}			else {				cursorPt.x += width / 2;			}			OS.SetCursorPos (cursorPt.x, cursorPt.y);			/* The event must be sent because doit flag is used */			Event event = new Event ();			event.x = newX;  event.y = newY;			event.width = width;  event.height = height;						/*			* It is possible (but unlikely), that application			* code could have disposed the widget in the selection			* event.  If this happens, end the processing of the			* Windows message by returning zero as the result of			* the window proc.			*/			sendEvent (SWT.Selection, event);			if (isDisposed ()) return LRESULT.ZERO;			return result;	}	return result;}LRESULT WM_GETDLGCODE (int wParam, int lParam) {	return new LRESULT (OS.DLGC_STATIC);}LRESULT WM_LBUTTONDOWN (int wParam, int lParam) {	LRESULT result = super.WM_LBUTTONDOWN (wParam, lParam);	/* Compute the banding rectangle */	int hwndTrack = parent.handle;	POINT pt = new POINT ();	pt.x = (short) (lParam & 0xFFFF);	pt.y = (short) (lParam >> 16);	RECT rect = new RECT ();	OS.GetWindowRect (handle, rect);	OS.MapWindowPoints (handle, 0, pt, 1);	startX = pt.x - rect.left;	startY = pt.y - rect.top;	OS.MapWindowPoints (0, hwndTrack, rect, 2);	lastX = rect.left;	lastY = rect.top;	int width = rect.right - rect.left;	int height = rect.bottom - rect.top;	/* The event must be sent because doit flag is used */	Event event = new Event ();	event.x = lastX;	event.y = lastY;	event.width = width;	event.height = height;	event.detail = SWT.DRAG;		/*	* It is possible (but unlikely), that application	* code could have disposed the widget in the selection	* event.  If this happens, end the processing of the	* Windows message by returning zero as the result of	* the window proc.	*/	sendEvent (SWT.Selection, event);	if (isDisposed ()) return LRESULT.ZERO;		/* Draw the banding rectangle */	if (event.doit) {		dragging = true;		menuShell ().bringToTop ();		if (OS.IsWinCE) {			OS.UpdateWindow (hwndTrack);		} else {			int flags = OS.RDW_UPDATENOW | OS.RDW_ALLCHILDREN;			OS.RedrawWindow (hwndTrack, null, 0, flags);		}		drawBand (lastX = event.x, lastY = event.y, width, height);	}	return result;}LRESULT WM_LBUTTONUP (int wParam, int lParam) {	LRESULT result = super.WM_LBUTTONUP (wParam, lParam);	/* Compute the banding rectangle */	if (!dragging) return result;	dragging = false;	RECT rect = new RECT ();	OS.GetWindowRect (handle, rect);	int width = rect.right - rect.left;	int height = rect.bottom - rect.top;		/* The event must be sent because doit flag is used */	Event event = new Event ();	event.x = lastX;	event.y = lastY;	event.width = width;	event.height = height;	drawBand (lastX, lastY, width, height);	sendEvent (SWT.Selection, event);	// widget could be disposed at this point	return result;}LRESULT WM_MOUSEMOVE (int wParam, int lParam) {	LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);	if (result != null) return result;	if (!dragging || (wParam & OS.MK_LBUTTON) == 0) return result;	/* Compute the banding rectangle */	POINT pt = new POINT ();	pt.x = (short) (lParam & 0xFFFF);	pt.y = (short) (lParam >> 16);	int hwndTrack = parent.handle;	OS.MapWindowPoints (handle, hwndTrack, pt, 1);	RECT rect = new RECT (), clientRect = new RECT ();	OS.GetWindowRect (handle, rect);	int width = rect.right - rect.left;	int height = rect.bottom - rect.top;	OS.GetClientRect (hwndTrack, clientRect);	int newX = lastX, newY = lastY;	if ((style & SWT.VERTICAL) != 0) {		int clientWidth = clientRect.right - clientRect.left;		newX = Math.min (Math.max (0, pt.x - startX), clientWidth - width);	} else {		int clientHeight = clientRect.bottom - clientRect.top;		newY = Math.min (Math.max (0, pt.y - startY), clientHeight - height);	}	if (newX == lastX && newY == lastY) return result;	drawBand (lastX, lastY, width, height);	/* The event must be sent because doit flag is used */	Event event = new Event ();	event.x = newX;	event.y = newY;	event.width = width;	event.height = height;	event.detail = SWT.DRAG;		/*	* It is possible (but unlikely), that application	* code could have disposed the widget in the selection	* event.  If this happens, end the processing of the	* Windows message by returning zero as the result of	* the window proc.	*/	sendEvent (SWT.Selection, event);	if (isDisposed ()) return LRESULT.ZERO;	/* Draw the banding rectangle */	if (event.doit) {		lastX = event.x; lastY = event.y;		if (OS.IsWinCE) {			OS.UpdateWindow (hwndTrack);		} else {			int flags = OS.RDW_UPDATENOW | OS.RDW_ALLCHILDREN;			OS.RedrawWindow (hwndTrack, null, 0, flags);		}		drawBand (lastX, lastY, width, height);	}	return result;}LRESULT WM_SETCURSOR (int wParam, int lParam) {	LRESULT result = super.WM_SETCURSOR (wParam, lParam);	if (result != null) return result;	int hitTest = lParam & 0xFFFF; 	if (hitTest == OS.HTCLIENT) {	 	int hCursor = 0;	 	if ((style & SWT.HORIZONTAL) != 0) {			hCursor = OS.LoadCursor (0, OS.IDC_SIZENS);	 	} else {			hCursor = OS.LoadCursor (0, OS.IDC_SIZEWE);	 	}		OS.SetCursor (hCursor);		return LRESULT.ONE;	}	return result;}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲成人av一区| 成人精品电影在线观看| 国产成人亚洲综合a∨猫咪| av一区二区三区四区| 91精品国产91综合久久蜜臀| 最新热久久免费视频| 久99久精品视频免费观看| 91日韩在线专区| 国产精品毛片大码女人| 免费观看日韩av| 欧美亚洲国产一区二区三区| 国产片一区二区| 免费高清视频精品| 欧美日韩国产一区二区三区地区| 国产精品久久午夜| 国产原创一区二区| 久久综合色鬼综合色| 日本女优在线视频一区二区| 日本乱人伦一区| 中文字幕一区日韩精品欧美| 韩国av一区二区三区四区| 91精品免费观看| 日日骚欧美日韩| 欧美精品1区2区| 午夜婷婷国产麻豆精品| 在线亚洲精品福利网址导航| 亚洲欧美另类久久久精品| a亚洲天堂av| 国产精品女主播av| 不卡一卡二卡三乱码免费网站| 久久久亚洲高清| 国产精品综合在线视频| 久久久久久久久久久久久久久99| 黄色精品一二区| 久久影院视频免费| 欧美日韩在线观看一区二区 | 亚洲精品日韩一| av资源站一区| 亚洲婷婷在线视频| 91啪亚洲精品| 亚洲理论在线观看| 欧美日韩中文字幕一区二区| 亚洲va欧美va国产va天堂影院| 欧美吞精做爰啪啪高潮| 午夜精品福利在线| 午夜av一区二区三区| 中文字幕五月欧美| 国产在线精品一区二区夜色| 欧美成人官网二区| 国产iv一区二区三区| 国产精品黄色在线观看| 在线观看免费成人| 免费欧美高清视频| 精品国精品自拍自在线| 成人一区二区三区在线观看| 国产精品福利一区二区三区| 在线观看一区日韩| 六月丁香婷婷久久| 久久品道一品道久久精品| 91在线视频观看| 日本不卡视频在线观看| 国产亚洲福利社区一区| 精品视频一区三区九区| 精品一区二区三区欧美| 国产精品福利影院| 欧美一区永久视频免费观看| 国产一区二区三区不卡在线观看| 中文字幕在线不卡一区| 欧美日本在线播放| 国产精品一级黄| 一卡二卡三卡日韩欧美| 日韩午夜激情av| 97se亚洲国产综合自在线 | 中文字幕欧美日韩一区| 91福利国产成人精品照片| 美腿丝袜亚洲综合| 亚洲天堂福利av| 欧美精品一区二区三区蜜桃| 91麻豆精品在线观看| 久久国产精品99精品国产| 亚洲美女在线国产| 久久尤物电影视频在线观看| 91黄色免费版| 成人一区在线看| 久久97超碰国产精品超碰| 亚洲一区二区美女| 国产精品另类一区| 欧美成人高清电影在线| 欧美午夜精品电影| 97se狠狠狠综合亚洲狠狠| 黄网站免费久久| 日本女人一区二区三区| 一区二区三区毛片| 国产精品情趣视频| 久久久久久亚洲综合| 日韩视频在线观看一区二区| 欧美视频精品在线| 色婷婷综合久久久中文一区二区| 国产69精品久久久久毛片| 欧美bbbbb| 五月天欧美精品| 亚洲精品国产成人久久av盗摄 | 成人黄色av电影| 国产乱人伦精品一区二区在线观看 | 91美女精品福利| 成人午夜大片免费观看| 狠狠狠色丁香婷婷综合激情| 青青草国产精品97视觉盛宴| 亚洲午夜精品网| 亚洲午夜久久久久| 一区二区三区欧美亚洲| 亚洲欧美另类小说视频| 亚洲欧美日韩一区二区| 国产精品黄色在线观看| 国产精品福利在线播放| 国产亚洲va综合人人澡精品 | 国产精品一区二区黑丝| 国产尤物一区二区| 粉嫩av一区二区三区在线播放 | 91久久精品网| 欧美日免费三级在线| 欧美羞羞免费网站| 欧美日韩午夜在线视频| 欧美一区二区国产| 欧美成人精品高清在线播放 | 日韩欧美一区二区在线视频| 日韩一区二区在线免费观看| 精品欧美久久久| 久久先锋影音av鲁色资源网| 国产精品丝袜在线| 一个色在线综合| 日产精品久久久久久久性色| 国产最新精品免费| aaa欧美日韩| 欧美日韩一区二区三区四区五区 | 色综合久久六月婷婷中文字幕| 在线这里只有精品| 欧美高清视频不卡网| 欧美高清精品3d| 99国产精品国产精品久久| 成人性生交大合| 成人激情免费电影网址| 欧美色图第一页| 日韩一区二区麻豆国产| 欧美一级高清片| 91久久精品一区二区二区| 91精品国产综合久久久久| 日韩免费观看高清完整版在线观看| 7777精品伊人久久久大香线蕉最新版| 欧美日韩成人一区二区| 精品国产三级a在线观看| 久久综合九色综合欧美亚洲| 国产精品污www在线观看| 亚洲人快播电影网| 一区二区三区在线视频免费| 精品一区二区影视| 成人免费视频网站在线观看| 91丨九色丨尤物| 在线成人免费视频| 中文字幕第一区| 亚洲图片欧美一区| 麻豆国产精品官网| 成人h动漫精品一区二区| 国产又黄又大久久| 91麻豆国产福利精品| 欧美一级黄色大片| 中文字幕巨乱亚洲| 亚洲国产一二三| 国产激情偷乱视频一区二区三区| 99麻豆久久久国产精品免费| 欧美日韩免费一区二区三区 | 99精品在线免费| 欧美一区二区三区播放老司机| 26uuu另类欧美亚洲曰本| 亚洲mv在线观看| 国产·精品毛片| 884aa四虎影成人精品一区| 久久久影视传媒| 麻豆高清免费国产一区| 不卡的av在线播放| 91精品在线免费| 1024成人网色www| 成人免费精品视频| 日韩情涩欧美日韩视频| 亚洲欧美日韩在线| 国产成人高清视频| 欧美精品在线观看一区二区| 中文无字幕一区二区三区| 亚洲成a天堂v人片| jiyouzz国产精品久久| 国产午夜精品久久久久久免费视| 日韩精品一区第一页| 91偷拍与自偷拍精品| 久久精品免视看| 国产一区二区看久久| 日韩午夜三级在线| 丝袜亚洲另类欧美| 91国偷自产一区二区三区观看| 一区二区三区欧美| 91色综合久久久久婷婷|