亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
av综合在线播放| 国产精品久久久久久户外露出| 亚洲乱码一区二区三区在线观看| 国产成人av影院| 18成人在线观看| 91成人在线精品| 日韩精品每日更新| 精品国产91乱码一区二区三区| 精品中文av资源站在线观看| 91国内精品野花午夜精品| 日本一区二区三区高清不卡| 成人aa视频在线观看| 亚洲美女免费视频| 欧美日韩国产乱码电影| 精品在线一区二区| 中文字幕av一区二区三区| 在线免费观看日韩欧美| 日日嗨av一区二区三区四区| 欧美xxxx老人做受| jizz一区二区| 日韩黄色小视频| 国产喷白浆一区二区三区| 91在线精品一区二区三区| 午夜久久久影院| 国产欧美在线观看一区| 在线一区二区三区| 激情六月婷婷久久| 亚洲乱码国产乱码精品精的特点| 91精品久久久久久久91蜜桃| 粉嫩一区二区三区在线看| 视频在线观看91| 中文字幕亚洲综合久久菠萝蜜| 欧美精品一区二区久久久| 不卡一二三区首页| 六月丁香婷婷色狠狠久久| 亚洲男人电影天堂| 久久九九99视频| 欧美蜜桃一区二区三区| av在线不卡免费看| 黑人巨大精品欧美黑白配亚洲| 亚洲精品一卡二卡| 国产视频一区二区在线观看| 在线不卡免费av| 91麻豆产精品久久久久久 | 亚洲成人免费视频| 国产欧美综合在线观看第十页 | 日韩免费一区二区| 日本韩国精品在线| 成人看片黄a免费看在线| 麻豆极品一区二区三区| 一区二区三区日本| 国产精品福利影院| 精品sm在线观看| 欧美一级xxx| 欧美日韩国产一级| 91麻豆国产自产在线观看| 国产91富婆露脸刺激对白| 免费成人在线播放| 婷婷成人激情在线网| 亚洲免费观看高清完整版在线| 久久日一线二线三线suv| 91精品国产免费久久综合| 欧美伊人久久久久久久久影院 | 午夜电影一区二区三区| 亚洲精品videosex极品| 中文字幕一区二区在线观看 | 欧美大片顶级少妇| 91精品一区二区三区在线观看| 色香蕉成人二区免费| 成人黄色一级视频| 成人午夜碰碰视频| 成人理论电影网| 成人动漫视频在线| av在线这里只有精品| www.亚洲精品| av在线一区二区三区| 99久久免费精品高清特色大片| 成人高清在线视频| 97se亚洲国产综合在线| 99精品久久久久久| 91国产成人在线| 欧美怡红院视频| 欧美一区二区三区视频在线 | 欧美电视剧免费全集观看| 欧美一级欧美三级| 国产精品久久久久精k8| 国产精品网曝门| 国产精品伦一区| 亚洲精品一二三| 午夜a成v人精品| 奇米888四色在线精品| 久久成人免费电影| 成人天堂资源www在线| 色综合久久综合中文综合网| 欧美艳星brazzers| 日韩欧美国产三级电影视频| 久久久精品一品道一区| 国产精品网友自拍| 亚洲一区二区三区视频在线播放 | 国产成人8x视频一区二区| 99vv1com这只有精品| 欧美日韩视频一区二区| 日韩一级黄色大片| 久久精品人人爽人人爽| 亚洲女厕所小便bbb| 日韩成人精品在线| 成人免费观看男女羞羞视频| 欧美在线小视频| 精品国产免费一区二区三区香蕉| 国产视频一区二区在线| 亚洲一区在线观看视频| 久久精品国产一区二区三| 成人激情综合网站| 91.成人天堂一区| 中文字幕精品一区| 亚洲第一搞黄网站| 丁香一区二区三区| 欧美男生操女生| 国产精品成人一区二区三区夜夜夜| 亚洲高清免费在线| 丁香婷婷综合网| 7777精品伊人久久久大香线蕉的 | 亚洲一区二区在线视频| 久久激情综合网| 91无套直看片红桃| 亚洲精品一区二区三区99| 亚洲精品中文在线| 国产精品一区二区在线观看不卡 | 毛片av一区二区三区| 91视频免费观看| 久久夜色精品一区| 亚洲国产成人av| 波多野洁衣一区| 久久这里只有精品首页| 国产一区二区三区四区五区入口 | 国产亚洲精品aa午夜观看| 亚洲成人一区二区在线观看| 国产传媒一区在线| 欧美一区二区视频在线观看2020 | 久久99精品视频| 欧美三级中文字幕在线观看| 中文字幕精品三区| 激情综合色播激情啊| 欧美日韩大陆一区二区| 亚洲日本电影在线| 国产成人免费高清| 精品国产伦一区二区三区免费 | 久久爱www久久做| 777亚洲妇女| 亚洲一区二区欧美激情| 99天天综合性| 国产精品视频一区二区三区不卡| 久久成人免费电影| 欧美日韩国产高清一区二区三区| 亚洲免费av观看| 99re视频这里只有精品| 亚洲国产成人自拍| 国产美女精品人人做人人爽| 欧美一区二区久久| 五月婷婷久久综合| 欧美视频日韩视频在线观看| 亚洲女女做受ⅹxx高潮| 97久久精品人人做人人爽50路| 欧美激情艳妇裸体舞| 国产精品一二三区| 久久久久国产精品人| 国产精品一区二区视频| 久久久久久久免费视频了| 精品无人码麻豆乱码1区2区| 日韩免费成人网| 九九在线精品视频| 久久久99久久精品欧美| 国产福利一区二区三区视频| 久久久影视传媒| 成人综合在线观看| 成人欧美一区二区三区| 91在线观看免费视频| 一区二区三区在线视频观看| 在线观看日韩电影| 午夜国产精品一区| 欧美电影免费提供在线观看| 国产一区二区三区在线观看免费| 久久九九久精品国产免费直播| 国产成人高清视频| 18成人在线观看| 欧美做爰猛烈大尺度电影无法无天| 一区二区三区视频在线观看| 欧美久久一二区| 久久97超碰色| 中文字幕一区二区三区在线不卡| 91网上在线视频| 日韩 欧美一区二区三区| 精品国产露脸精彩对白| 国产电影精品久久禁18| 亚洲欧美国产高清| 欧美国产一区二区| 在线观看免费亚洲| 蜜臀av性久久久久蜜臀aⅴ流畅| 久久精品日产第一区二区三区高清版 | 最好看的中文字幕久久|