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

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

?? decorations.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
/******************************************************************************* * 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.win32.*;import org.eclipse.swt.*;import org.eclipse.swt.graphics.*;/** * Instances of this class provide the appearance and * behavior of <code>Shells</code>, but are not top * level shells or dialogs. Class <code>Shell</code> * shares a significant amount of code with this class, * and is a subclass. * <p> * IMPORTANT: This class was intended to be abstract and * should <em>never</em> be referenced or instantiated. * Instead, the class <code>Shell</code> should be used. * </p> * <p> * Instances are always displayed in one of the maximized,  * minimized or normal states: * <ul> * <li> * When an instance is marked as <em>maximized</em>, the * window manager will typically resize it to fill the * entire visible area of the display, and the instance * is usually put in a state where it can not be resized  * (even if it has style <code>RESIZE</code>) until it is * no longer maximized. * </li><li> * When an instance is in the <em>normal</em> state (neither * maximized or minimized), its appearance is controlled by * the style constants which were specified when it was created * and the restrictions of the window manager (see below). * </li><li> * When an instance has been marked as <em>minimized</em>, * its contents (client area) will usually not be visible, * and depending on the window manager, it may be * "iconified" (that is, replaced on the desktop by a small * simplified representation of itself), relocated to a * distinguished area of the screen, or hidden. Combinations * of these changes are also possible. * </li> * </ul> * </p> * Note: The styles supported by this class must be treated * as <em>HINT</em>s, since the window manager for the * desktop on which the instance is visible has ultimate * control over the appearance and behavior of decorations. * For example, some window managers only support resizable * windows and will always assume the RESIZE style, even if * it is not set. * <dl> * <dt><b>Styles:</b></dt> * <dd>BORDER, CLOSE, MIN, MAX, NO_TRIM, RESIZE, TITLE, ON_TOP, TOOL</dd> * <dt><b>Events:</b></dt> * <dd>(none)</dd> * </dl> * Class <code>SWT</code> provides two "convenience constants" * for the most commonly required style combinations: * <dl> * <dt><code>SHELL_TRIM</code></dt> * <dd> * the result of combining the constants which are required * to produce a typical application top level shell: (that  * is, <code>CLOSE | TITLE | MIN | MAX | RESIZE</code>) * </dd> * <dt><code>DIALOG_TRIM</code></dt> * <dd> * the result of combining the constants which are required * to produce a typical application dialog shell: (that  * is, <code>TITLE | CLOSE | BORDER</code>) * </dd> * </dl> * <p> * IMPORTANT: This class is intended to be subclassed <em>only</em> * within the SWT implementation. * </p> * * @see #getMinimized * @see #getMaximized * @see Shell * @see SWT */public class Decorations extends Canvas {	Image image, smallImage, largeImage;	Image [] images;	Menu menuBar;	Menu [] menus;	Control savedFocus;	Button defaultButton, saveDefault;	int swFlags, hAccel, nAccel;/** * Prevents uninitialized instances from being created outside the package. */Decorations () {}/** * 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#BORDER * @see SWT#CLOSE * @see SWT#MIN * @see SWT#MAX * @see SWT#RESIZE * @see SWT#TITLE * @see SWT#NO_TRIM * @see SWT#SHELL_TRIM * @see SWT#DIALOG_TRIM * @see SWT#ON_TOP * @see SWT#TOOL * @see Widget#checkSubclass * @see Widget#getStyle */public Decorations (Composite parent, int style) {	super (parent, checkStyle (style));}void addMenu (Menu menu) {	if (menus == null) menus = new Menu [4];	for (int i=0; i<menus.length; i++) {		if (menus [i] == null) {			menus [i] = menu;			return;		}	}	Menu [] newMenus = new Menu [menus.length + 4];	newMenus [menus.length] = menu;	System.arraycopy (menus, 0, newMenus, 0, menus.length);	menus = newMenus;}void bringToTop () {	/*	* This code is intentionally commented.  On some platforms,	* the ON_TOP style creates a shell that will stay on top	* of every other shell on the desktop.  Using SetWindowPos ()	* with HWND_TOP caused problems on Windows 98 so this code is	* commented out until this functionality is specified and	* the problems are fixed.	*///	if ((style & SWT.ON_TOP) != 0) {//		int flags = OS.SWP_NOSIZE | OS.SWP_NOMOVE | OS.SWP_NOACTIVATE; //		OS.SetWindowPos (handle, OS.HWND_TOP, 0, 0, 0, 0, flags);//	} else {		OS.BringWindowToTop (handle);//	}}static int checkStyle (int style) {	if (OS.IsWinCE) {		/*		* Feature in WinCE PPC.  WS_MINIMIZEBOX or WS_MAXIMIZEBOX		* are not supposed to be used.  If they are, the result		* is a button which does not repaint correctly.  The fix		* is to remove this style.		*/		if ((style & SWT.MIN) != 0) style &= ~SWT.MIN;		if ((style & SWT.MAX) != 0) style &= ~SWT.MAX;		return style;	}	/*	* If either WS_MINIMIZEBOX or WS_MAXIMIZEBOX are set,	* we must also set WS_SYSMENU or the buttons will not	* appear.	*/	if ((style & (SWT.MIN | SWT.MAX)) != 0) style |= SWT.CLOSE;		/*	* Both WS_SYSMENU and WS_CAPTION must be set in order	* to for the system menu to appear.	*/	if ((style & SWT.CLOSE) != 0) style |= SWT.TITLE;		/*	* Bug in Windows.  The WS_CAPTION style must be	* set when the window is resizable or it does not	* draw properly.	*/	/*	* This code is intentionally commented.  It seems	* that this problem originally in Windows 3.11,	* has been fixed in later versions.  Because the	* exact nature of the drawing problem is unknown,	* keep the commented code around in case it comes	* back.	*///	if ((style & SWT.RESIZE) != 0) style |= SWT.TITLE;		return style;}protected void checkSubclass () {	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);}int callWindowProc (int msg, int wParam, int lParam) {	return OS.DefMDIChildProc (handle, msg, wParam, lParam);}Control computeTabGroup () {	return this;}Control computeTabRoot () {	return this;}public Rectangle computeTrim (int x, int y, int width, int height) {	checkWidget ();	/* Get the size of the trimmings */	RECT rect = new RECT ();	OS.SetRect (rect, x, y, x + width, y + height);	int bits = OS.GetWindowLong (handle, OS.GWL_STYLE);	boolean hasMenu = OS.IsWinCE ? false : OS.GetMenu (handle) != 0;	OS.AdjustWindowRectEx (rect, bits, hasMenu, OS.GetWindowLong (handle, OS.GWL_EXSTYLE));	/* Get the size of the scroll bars */	if (horizontalBar != null) rect.bottom += OS.GetSystemMetrics (OS.SM_CYHSCROLL);	if (verticalBar != null) rect.right += OS.GetSystemMetrics (OS.SM_CXVSCROLL);	/* Get the height of the menu bar */	if (hasMenu) {		RECT testRect = new RECT ();		OS.SetRect (testRect, 0, 0, rect.right - rect.left, rect.bottom - rect.top);		OS.SendMessage (handle, OS.WM_NCCALCSIZE, 0, testRect);		while ((testRect.bottom - testRect.top) < height) {			rect.top -= OS.GetSystemMetrics (OS.SM_CYMENU) - OS.GetSystemMetrics (OS.SM_CYBORDER);			OS.SetRect(testRect, 0, 0, rect.right - rect.left, rect.bottom - rect.top);			OS.SendMessage (handle, OS.WM_NCCALCSIZE, 0, testRect);		}	}	return new Rectangle (rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top);}void createAccelerators () {	hAccel = nAccel = 0;	int maxAccel = 0;	MenuItem [] items = display.items;	if (menuBar == null || items == null) {		if (!OS.IsPPC) return;		maxAccel = 1;	} else {		maxAccel = OS.IsPPC ? items.length + 1 : items.length;	}	ACCEL accel = new ACCEL ();	byte [] buffer1 = new byte [ACCEL.sizeof];		byte [] buffer2 = new byte [maxAccel * ACCEL.sizeof];	if (menuBar != null && items != null) {		for (int i=0; i<items.length; i++) {			MenuItem item = items [i];			if (item != null && item.accelerator != 0) {				Menu menu = item.parent;				if (menu.parent == this) {					while (menu != null && menu != menuBar) {						menu = menu.getParentMenu ();					}					if (menu == menuBar) {						item.fillAccel (accel);						OS.MoveMemory (buffer1, accel, ACCEL.sizeof);						System.arraycopy (buffer1, 0, buffer2, nAccel * ACCEL.sizeof, ACCEL.sizeof);						nAccel++;					}				}			}		}	}	if (OS.IsPPC) {		/* 		* Note on WinCE PPC.  Close the shell when user taps CTRL-Q.		* IDOK represents the "Done Button" which also closes the shell.		*/		accel.fVirt = (byte) (OS.FVIRTKEY | OS.FCONTROL);		accel.key = (short) 'Q';		accel.cmd = (short) OS.IDOK;		OS.MoveMemory (buffer1, accel, ACCEL.sizeof);		System.arraycopy (buffer1, 0, buffer2, nAccel * ACCEL.sizeof, ACCEL.sizeof);		nAccel++;				}	if (nAccel != 0) hAccel = OS.CreateAcceleratorTable (buffer2, nAccel);}void createHandle () {	super.createHandle ();	if (parent == null) return;	setParent ();	setSystemMenu ();}void createWidget () {	super.createWidget ();	swFlags = OS.IsWinCE ? OS.SW_SHOWMAXIMIZED : OS.SW_SHOWNOACTIVATE;	hAccel = -1;}void destroyAccelerators () {	if (hAccel != 0 && hAccel != -1) OS.DestroyAcceleratorTable (hAccel);	hAccel = -1;}public void dispose () {	if (isDisposed()) return;	if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);	if (!(this instanceof Shell)) {		setVisible (false);		if (!traverseDecorations (false)) {			Shell shell = getShell ();			shell.setFocus ();		}	}	super.dispose ();}Menu findMenu (int hMenu) {	if (menus == null) return null;	for (int i=0; i<menus.length; i++) {		Menu menu = menus [i];		if (menu != null && hMenu == menu.handle) return menu;	}	return null;}void fixDecorations (Decorations newDecorations, Control control, Menu [] menus) {	if (this == newDecorations) return;	if (control == savedFocus) savedFocus = null;	if (control == defaultButton) defaultButton = null;	if (control == saveDefault) saveDefault = null;	if (menus == null) return;	Menu menu = control.menu;	if (menu != null) {		int index = 0;		while (index <menus.length) {			if (menus [index] == menu) {				control.setMenu (null);				return;			}			index++;		}		menu.fixMenus (newDecorations);		destroyAccelerators ();		newDecorations.destroyAccelerators ();	}}public Rectangle getBounds () {	checkWidget ();	if (!OS.IsWinCE) {		if (OS.IsIconic (handle)) {			WINDOWPLACEMENT lpwndpl = new WINDOWPLACEMENT ();			lpwndpl.length = WINDOWPLACEMENT.sizeof;			OS.GetWindowPlacement (handle, lpwndpl);			int width = lpwndpl.right - lpwndpl.left;			int height = lpwndpl.bottom - lpwndpl.top;			return new Rectangle (lpwndpl.left, lpwndpl.top, width, height);		}	}	return super.getBounds ();}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品久久久久久久久久久久久久久久久| 波多野结衣欧美| 欧美日韩国产首页| 午夜精品久久一牛影视| 欧美伊人久久大香线蕉综合69| 亚洲乱码中文字幕综合| 欧美自拍偷拍午夜视频| 偷拍一区二区三区四区| 精品国产免费视频| 国产91精品一区二区麻豆亚洲| 亚洲欧美怡红院| 欧美日韩aaaaa| 国产精品自拍网站| 亚洲欧美电影一区二区| 欧美精品v国产精品v日韩精品| 秋霞成人午夜伦在线观看| 久久蜜桃av一区二区天堂 | 欧美精品成人一区二区三区四区| 亚洲一区二区三区四区五区黄| 欧美精品在线一区二区| 国产高清精品网站| 亚洲男人的天堂av| 欧美成人欧美edvon| 高清不卡一二三区| 亚洲乱码国产乱码精品精98午夜| 91精品欧美福利在线观看| 精品亚洲porn| 亚洲柠檬福利资源导航| 日韩美女视频在线| 成人性色生活片免费看爆迷你毛片| 亚洲人午夜精品天堂一二香蕉| 欧美日韩精品是欧美日韩精品| 久久国产精品免费| 最近日韩中文字幕| 日韩精品中文字幕一区二区三区| 国产精品亚洲专一区二区三区 | 欧美另类久久久品| 国产大片一区二区| 日韩vs国产vs欧美| 亚洲欧洲日韩综合一区二区| 欧美巨大另类极品videosbest| 国产福利一区在线观看| 亚洲综合免费观看高清完整版在线| 日韩精品一区二区三区在线观看 | 精品成人一区二区| 日本二三区不卡| 国产福利一区二区三区视频在线| 亚洲精品高清在线| 国产日产精品1区| 91精品一区二区三区久久久久久 | 日韩欧美第一区| 91丨九色丨尤物| 国产自产v一区二区三区c| 亚洲午夜电影网| 最近中文字幕一区二区三区| 久久综合资源网| 日韩一区二区三区免费观看| 91官网在线免费观看| 波多野结衣的一区二区三区| 国产精品1区2区| 看片的网站亚洲| 亚洲一区二区免费视频| 亚洲欧洲国产日韩| 国产午夜精品在线观看| 日韩欧美的一区| 欧美日韩国产色站一区二区三区| 91香蕉国产在线观看软件| 国产a久久麻豆| 国产不卡免费视频| 激情综合网最新| 美国精品在线观看| 久久国产精品99久久久久久老狼| 天天色综合成人网| 日韩电影在线免费看| 日本不卡一区二区| 丝袜诱惑制服诱惑色一区在线观看 | 粉嫩绯色av一区二区在线观看| 国产尤物一区二区| 国产一区二区0| 精品一区二区三区蜜桃| 久久电影网电视剧免费观看| 美女视频网站久久| 蜜臀av一区二区在线免费观看 | 成人综合激情网| 国产精品123| 国产99久久久国产精品潘金| 粉嫩av一区二区三区在线播放| 成人午夜又粗又硬又大| 成人国产精品免费观看视频| 95精品视频在线| 在线免费亚洲电影| 欧美性色黄大片手机版| 欧美精品丝袜久久久中文字幕| 日韩一二三四区| 久久久久久久久久久久久女国产乱| 久久久国际精品| 1024成人网色www| 亚洲va欧美va国产va天堂影院| 午夜精品久久久久久久蜜桃app| 日韩电影免费在线| 国产精品中文有码| 色综合久久久久综合体桃花网| 91精品91久久久中77777| 欧美日韩情趣电影| 精品区一区二区| 中文字幕一区视频| 午夜欧美一区二区三区在线播放| 久久99久久99精品免视看婷婷| 成人av免费在线观看| 欧美日韩一区二区在线观看 | 成人高清视频在线| 欧美日韩一区中文字幕| 精品国产三级电影在线观看| 亚洲人成亚洲人成在线观看图片 | 午夜视频一区二区| 国产九色精品成人porny| 色婷婷av一区二区三区软件| 91精品国产aⅴ一区二区| 国产精品伦一区| 天天亚洲美女在线视频| 成人国产亚洲欧美成人综合网| 欧美亚洲图片小说| 久久亚洲春色中文字幕久久久| 亚洲三级免费观看| 国产专区综合网| 884aa四虎影成人精品一区| 国产精品毛片久久久久久| 裸体一区二区三区| 色噜噜偷拍精品综合在线| 精品成人在线观看| 五月天久久比比资源色| 99re成人在线| 久久伊人中文字幕| 日本免费新一区视频| 91蜜桃网址入口| 国产亚洲精品福利| 美国一区二区三区在线播放| 欧美三级中文字幕| 中文字幕一区二区三区不卡在线| 精品一区二区三区久久| 在线播放91灌醉迷j高跟美女| 国产精品久久久久久久久久久免费看 | 91麻豆精品91久久久久同性| ●精品国产综合乱码久久久久| 久久99久久久久| 欧美一区二区成人| 亚洲图片一区二区| 色屁屁一区二区| 亚洲视频在线观看三级| 国产成人欧美日韩在线电影| 亚洲精品一区在线观看| 蜜臀av性久久久久蜜臀aⅴ流畅 | 制服丝袜av成人在线看| 亚洲国产cao| 欧美色男人天堂| 亚洲午夜羞羞片| 欧美专区亚洲专区| 亚洲另类在线视频| 日本韩国欧美在线| 亚洲黄色性网站| 91久久精品一区二区三| 亚洲欧美国产三级| 在线亚洲人成电影网站色www| 17c精品麻豆一区二区免费| 福利一区在线观看| 国产精品午夜在线观看| 国产91精品露脸国语对白| 久久久三级国产网站| 国产成人日日夜夜| 国产精品护士白丝一区av| 成人av免费在线| 亚洲免费毛片网站| 欧美三级韩国三级日本一级| 五月天亚洲精品| 日韩免费观看2025年上映的电影 | 夫妻av一区二区| 国产精品理论片| 色综合婷婷久久| 亚洲国产精品久久艾草纯爱| 欧美视频第二页| 热久久国产精品| 久久久久久亚洲综合| 风间由美性色一区二区三区| 国产精品久久久久久亚洲伦| 色欧美乱欧美15图片| 午夜精品一区在线观看| 日韩美女视频一区二区在线观看| 国产一区二区三区免费看| 国产精品网站导航| 色999日韩国产欧美一区二区| 亚洲午夜免费电影| 欧美大片在线观看一区二区| 国产精品伊人色| 亚洲黄色小视频| 欧美电视剧在线观看完整版| 成年人网站91| 日韩高清一区在线| 中文字幕第一区第二区| 欧美天天综合网| 狠狠狠色丁香婷婷综合激情|