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

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

?? menu.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
				info.fMask = OS.MIIM_DATA;				info.dwItemData = item.id;				success = OS.SetMenuItemInfo (handle, index, true, info);			}		} else {			/*			* Bug in Windows.  For some reason, when InsertMenuItem()			* is used to insert an item without text, it is not possible			* to use SetMenuItemInfo() to set the text at a later time.			* The fix is to insert the item with some text.			* 			* Feature in Windows.  When an empty string is used instead			* of a space and InsertMenuItem() is used to set a submenu			* before setting text to a non-empty string, the menu item			* becomes unexpectedly disabled.  The fix is to insert a			* space.			*/			int hHeap = OS.GetProcessHeap ();			TCHAR buffer = new TCHAR (0, " ", true);			int byteCount = buffer.length () * TCHAR.sizeof;			int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);			OS.MoveMemory (pszText, buffer, byteCount);				MENUITEMINFO info = new MENUITEMINFO ();			info.cbSize = MENUITEMINFO.sizeof;			info.fMask = OS.MIIM_ID | OS.MIIM_TYPE | OS.MIIM_DATA;			info.wID = info.dwItemData = item.id;			info.fType = item.widgetStyle ();			info.dwTypeData = pszText;			success = OS.InsertMenuItem (handle, index, true, info);			if (pszText != 0) OS.HeapFree (hHeap, 0, pszText);		}	}	if (!success) {		display.removeMenuItem (item);		error (SWT.ERROR_ITEM_NOT_ADDED);	}	redraw ();}	void createWidget () {	/*	* Bug in IBM JVM 1.3.1.  For some reason, when the following code is called	* from this method, the JVM issues this error:	*	* JVM Exception 0x2 (subcode 0x0) occurred in thread "main" (TID:0x9F19D8)	* 	* In addition, on Windows XP, a dialog appears with following error message,	* indicating that the problem may be in the JIT:	* 	* AppName: java.exe	 AppVer: 0.0.0.0	 ModName: jitc.dll	* ModVer: 0.0.0.0	 Offset: 000b6912	* 	* The fix is to move the code to the caller of this method.	*///	checkOrientation (parent);	createHandle ();	parent.addMenu (this);}/** Currently not used.*/int defaultBackground () {	return OS.GetSysColor (OS.COLOR_MENU);}/** Currently not used.*/int defaultForeground () {	return OS.GetSysColor (OS.COLOR_MENUTEXT);}void destroyAccelerators () {	parent.destroyAccelerators ();}void destroyItem (MenuItem item) {	if (OS.IsWinCE) {		if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {			if (OS.IsSP) {				redraw();				return;			}			int index = OS.SendMessage (hwndCB, OS.TB_COMMANDTOINDEX, item.id, 0);			if (OS.SendMessage (hwndCB, OS.TB_DELETEBUTTON, index, 0) == 0) {				error (SWT.ERROR_ITEM_NOT_REMOVED);			}			int count = OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);			if (count == 0) {				if (imageList != null) {					OS.SendMessage (handle, OS.TB_SETIMAGELIST, 0, 0);					display.releaseImageList (imageList);					imageList = null;				}			}		} else {			int index = 0;			MENUITEMINFO info = new MENUITEMINFO ();			info.cbSize = MENUITEMINFO.sizeof;			info.fMask = OS.MIIM_DATA;			while (OS.GetMenuItemInfo (handle, index, true, info)) {				if (info.dwItemData == item.id) break;				index++;			}			if (info.dwItemData != item.id) {				error (SWT.ERROR_ITEM_NOT_REMOVED);			}				if (!OS.RemoveMenu (handle, index, OS.MF_BYPOSITION)) {				error (SWT.ERROR_ITEM_NOT_REMOVED);			}		}	} else {		if (!OS.RemoveMenu (handle, item.id, OS.MF_BYCOMMAND)) {			error (SWT.ERROR_ITEM_NOT_REMOVED);		}	}	redraw ();}void destroyWidget () {	int hMenu = handle, hCB = hwndCB;	releaseHandle ();	if (OS.IsWinCE && hCB != 0) {		OS.CommandBar_Destroy (hCB);	} else {		if (hMenu != 0) OS.DestroyMenu (hMenu);	}}void fixMenus (Decorations newParent) {	MenuItem [] items = getItems ();	for (int i=0; i<items.length; i++) {		items [i].fixMenus (newParent);	}	parent.removeMenu (this);	newParent.addMenu (this);	this.parent = newParent;}/** * Returns the default menu item or null if none has * been previously set. * * @return the default menu item. * * </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> */public MenuItem getDefaultItem () {	checkWidget ();	if (OS.IsWinCE) return null;	int id = OS.GetMenuDefaultItem (handle, OS.MF_BYCOMMAND, OS.GMDI_USEDISABLED);	if (id == -1) return null;	MENUITEMINFO info = new MENUITEMINFO ();	info.cbSize = MENUITEMINFO.sizeof;	info.fMask = OS.MIIM_ID;	if (OS.GetMenuItemInfo (handle, id, false, info)) {		return display.getMenuItem (info.wID);	}	return null;}/** * Returns <code>true</code> if the receiver is enabled, and * <code>false</code> otherwise. A disabled control is typically * not selectable from the user interface and draws with an * inactive or "grayed" look. * * @return the receiver's enabled state * * @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 #isEnabled */public boolean getEnabled () {	checkWidget ();	return (state & DISABLED) == 0;}/** * Returns the item at the given, zero-relative index in the * receiver. Throws an exception if the index is out of range. * * @param index the index of the item to return * @return the item at the given index * * @exception IllegalArgumentException <ul> *    <li>ERROR_INVALID_RANGE - if the index is not between 0 and the number of elements in the list minus 1 (inclusive)</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> */public MenuItem getItem (int index) {	checkWidget ();	int id = 0;	if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {		if (OS.IsPPC) {			TBBUTTON lpButton = new TBBUTTON ();			int result = OS.SendMessage (hwndCB, OS.TB_GETBUTTON, index, lpButton);			if (result == 0) error (SWT.ERROR_CANNOT_GET_ITEM);			id = lpButton.idCommand;		}		if (OS.IsSP) {			if (!(0 <= index && index <= 1)) error (SWT.ERROR_CANNOT_GET_ITEM);			id = index == 0 ? id0 : id1;		}	} else {		MENUITEMINFO info = new MENUITEMINFO ();		info.cbSize = MENUITEMINFO.sizeof;		info.fMask = OS.MIIM_DATA;		if (!OS.GetMenuItemInfo (handle, index, true, info)) {			error (SWT.ERROR_INVALID_RANGE);		}		id = info.dwItemData;	}	return display.getMenuItem (id);}/** * Returns the number of items contained in the receiver. * * @return the number of items * * @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 int getItemCount () {	checkWidget ();	return GetMenuItemCount (handle);}/** * Returns an array of <code>MenuItem</code>s which are the items * in the receiver.  * <p> * Note: This is not the actual structure used by the receiver * to maintain its list of items, so modifying the array will * not affect the receiver.  * </p> * * @return the items in the receiver * * @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 MenuItem [] getItems () {	checkWidget ();	if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {		if (OS.IsSP) {			MenuItem [] result = new MenuItem [2];			result[0] = display.getMenuItem (id0);			result[1] = display.getMenuItem (id1);			return result;		}		int count = OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);		TBBUTTON lpButton = new TBBUTTON ();		MenuItem [] result = new MenuItem [count];		for (int i=0; i<count; i++) {			OS.SendMessage (hwndCB, OS.TB_GETBUTTON, i, lpButton);			result [i] = display.getMenuItem (lpButton.idCommand);		}		return result;	}	int index = 0;	int length = OS.IsWinCE ? 4 : OS.GetMenuItemCount (handle);	MenuItem [] items = new MenuItem [length];	MENUITEMINFO info = new MENUITEMINFO ();	info.cbSize = MENUITEMINFO.sizeof;	info.fMask = OS.MIIM_DATA;	while (OS.GetMenuItemInfo (handle, index, true, info)) {		if (index == items.length) {			MenuItem [] newItems = new MenuItem [index + 4];			System.arraycopy (items, 0, newItems, 0, index);			items = newItems;		}		items [index++] = display.getMenuItem (info.dwItemData);	}	if (index == items.length) return items;	MenuItem [] result = new MenuItem [index];	System.arraycopy (items, 0, result, 0, index);	return result;}int GetMenuItemCount (int handle) {	checkWidget ();	if (OS.IsWinCE) {		if ((OS.IsPPC || OS.IsSP) && hwndCB != 0) {			return OS.IsSP ? 2 : OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);		}		int count = 0;		MENUITEMINFO info = new MENUITEMINFO ();		info.cbSize = MENUITEMINFO.sizeof;		while (OS.GetMenuItemInfo (handle, count, true, info)) count++;		return count;	}	return OS.GetMenuItemCount (handle);}String getNameText () {	String result = "";	MenuItem [] items = getItems ();	int length = items.length;	if (length > 0) {		for (int i=0; i<length-1; i++) {			result = result + items [i].getNameText() + ", ";		}		result = result + items [length-1].getNameText ();	}	return result;}/** * Returns the receiver's parent, which must be a <code>Decorations</code>. * * @return the receiver's parent * * @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 Decorations getParent () {	checkWidget ();	return parent;}/** * Returns the receiver's parent item, which must be a * <code>MenuItem</code> or null when the receiver is a * root. * * @return the receiver's parent item * * @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 MenuItem getParentItem () {	checkWidget ();	return cascade;}/** * Returns the receiver's parent item, which must be a * <code>Menu</code> or null when the receiver is a * root. * * @return the receiver's parent item * * @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 Menu getParentMenu () {	checkWidget ();	if (cascade != null) return cascade.parent;	return null;}/** * Returns the receiver's shell. For all controls other than * shells, this simply returns the control's nearest ancestor * shell. Shells return themselves, even if they are children * of other shells. * * @return the receiver's shell * * @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 #getParent */public Shell getShell () {	checkWidget ();	return parent.getShell ();}/** * Returns a point describing the receiver's size. The * x coordinate of the result is the width of the receiver. * The y coordinate of the result is the height of the * receiver. * * @return the receiver's size * * @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> *  * @since 3.0 *//*public*/ Point getSize () {	checkWidget ();	if (OS.IsWinCE) return new Point (0, 0);	if ((style & SWT.BAR) != 0) {		MENUBARINFO info = new MENUBARINFO ();		info.cbSize = MENUBARINFO.sizeof;		int hwndParent = parent.handle;		if (OS.GetMenuBarInfo (hwndParent, OS.OBJID_MENU, 0, info)) {			int width = info.right - info.left;			int height = info.bottom - info.top;			return new Point (width, height);		}	} else {		int count = GetMenuItemCount (handle);		if (count != 0) {			RECT rect1 = new RECT ();			int hwndParent = parent.handle;			if (OS.GetMenuItemRect (hwndParent, handle, 0, rect1)) {				RECT rect2 = new RECT ();				if (OS.GetMenuItemRect (hwndParent, handle, count - 1, rect2)) {					int width = (rect2.right - rect2.left) + 4;					int height = (rect2.bottom - rect1.top) + 4;					return new Point (width, height);				}			}		}	}	return new Point (0, 0);}/** * Returns <code>true</code> if the receiver is visible, and * <code>false</code> otherwise. * <p>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区视频| 欧美大片在线观看一区| 国产成人在线视频播放| 美女视频黄免费的久久 | 欧美日韩一卡二卡三卡 | 中文字幕在线观看不卡| 中文子幕无线码一区tr| 国产欧美精品区一区二区三区| 久久久久国产精品免费免费搜索| 久久天天做天天爱综合色| 久久精品亚洲麻豆av一区二区| 精品国产免费一区二区三区四区| 精品久久一区二区三区| 国产三级三级三级精品8ⅰ区| 国产欧美精品区一区二区三区| 国产性天天综合网| 亚洲欧美日韩在线| 三级欧美在线一区| 国产一区二区三区免费观看| 国产电影一区在线| 色94色欧美sute亚洲13| 欧美日韩国产精品自在自线| 日韩欧美卡一卡二| 国产精品久久久久久久浪潮网站| 亚洲人吸女人奶水| 麻豆精品在线观看| aaa亚洲精品| 欧美夫妻性生活| 国产三级三级三级精品8ⅰ区| 曰韩精品一区二区| 久久成人羞羞网站| 99re这里都是精品| 91精品国产全国免费观看| 国产网站一区二区三区| 亚洲午夜电影网| 韩国女主播成人在线| 色婷婷av一区二区三区软件| 日韩欧美激情一区| 亚洲黄色片在线观看| 精东粉嫩av免费一区二区三区| 99久久伊人精品| 欧美一级夜夜爽| 亚洲综合网站在线观看| 国产一区二区主播在线| 在线观看日韩一区| 国产精品视频一二三| 免费观看在线综合| 日本国产一区二区| 欧美激情一二三区| 久久99久久99| 欧美一区二区三区思思人| 亚洲日本乱码在线观看| 国产经典欧美精品| 欧美一级片在线看| 婷婷激情综合网| 日本丶国产丶欧美色综合| 久久久久9999亚洲精品| 麻豆精品新av中文字幕| 777xxx欧美| 亚洲午夜电影网| 色av一区二区| 亚洲精品免费看| av中文一区二区三区| 日本一区二区三区四区在线视频| 老司机精品视频一区二区三区| 欧美日韩国产bt| 亚洲大片免费看| 在线观看亚洲精品| 亚洲自拍偷拍麻豆| 欧美亚洲一区二区在线观看| 亚洲精品福利视频网站| 91麻豆文化传媒在线观看| 国产精品福利影院| 成人av手机在线观看| 国产精品女同一区二区三区| 不卡一区在线观看| 国产精品福利电影一区二区三区四区| 国产曰批免费观看久久久| www激情久久| 国产69精品一区二区亚洲孕妇| 久久蜜桃av一区二区天堂| 国产精品亚洲а∨天堂免在线| 久久久亚洲精品石原莉奈| 国产精品一区二区91| 中文一区二区在线观看| 97se亚洲国产综合自在线| 一区二区三区四区在线播放| 欧美性一区二区| 日韩国产欧美在线视频| 日韩欧美在线一区二区三区| 精品一区二区三区免费| 国产视频在线观看一区二区三区 | 亚洲免费观看高清完整版在线观看熊 | 欧美日韩国产电影| 久久精品99久久久| 久久久久久久网| 一本高清dvd不卡在线观看| 一区二区在线免费| 日韩一区二区电影网| 国产在线不卡视频| 亚洲美女淫视频| 欧美一级精品在线| 国产sm精品调教视频网站| 自拍视频在线观看一区二区| 欧美军同video69gay| 高清不卡一区二区| 亚洲国产精品视频| wwwwww.欧美系列| 色婷婷av一区| 激情深爱一区二区| 亚洲午夜久久久久久久久电影网 | 成人美女在线观看| 午夜精品一区二区三区电影天堂| 26uuu另类欧美| 在线观看欧美精品| 处破女av一区二区| 日韩电影在线观看电影| 国产精品久久久久久久岛一牛影视 | 欧洲精品视频在线观看| 久久99国产精品成人| 亚洲啪啪综合av一区二区三区| 日韩欧美国产综合一区| 91网站在线观看视频| 国产在线国偷精品产拍免费yy| 亚洲一区二区三区美女| 欧美国产欧美综合| 精品三级在线观看| 欧美乱妇23p| 91日韩精品一区| 国产精品18久久久久久久久久久久| 亚洲国产另类av| 中文字幕在线一区二区三区| 精品对白一区国产伦| 欧美一区二区三区免费视频 | 国产欧美日本一区视频| 日韩欧美色电影| 欧美猛男男办公室激情| 91首页免费视频| 不卡的av网站| 成人免费毛片嘿嘿连载视频| 久久精品国产精品亚洲精品| 秋霞午夜鲁丝一区二区老狼| 一区二区三区久久| 亚洲欧美成aⅴ人在线观看 | 91福利视频在线| 91色乱码一区二区三区| 91丨九色丨尤物| 91影视在线播放| 色哟哟国产精品免费观看| k8久久久一区二区三区| 成人97人人超碰人人99| 成人一区二区视频| 国产成a人无v码亚洲福利| 国产成a人无v码亚洲福利| 国产91精品精华液一区二区三区| 高清beeg欧美| 91香蕉视频黄| 欧美日韩国产首页| 91精品免费在线| 欧美tickling网站挠脚心| 久久久久久97三级| 欧美国产日韩亚洲一区| 亚洲女子a中天字幕| 亚洲一区二区精品视频| 青青草97国产精品免费观看无弹窗版| 日本成人在线视频网站| 激情综合网最新| 福利91精品一区二区三区| 99久久精品费精品国产一区二区| 色激情天天射综合网| 欧美美女bb生活片| 久久精品一区八戒影视| 亚洲天堂网中文字| 三级欧美在线一区| 国产老女人精品毛片久久| 国产黄色精品网站| 在线观看免费亚洲| 欧美一区二区三区色| 日本一区二区成人| 亚洲综合成人在线视频| 九色|91porny| 色综合咪咪久久| 91精品欧美一区二区三区综合在| 久久久久久久久一| 一区二区三区欧美视频| 韩日av一区二区| 色欧美片视频在线观看| 欧美变态口味重另类| 亚洲日本va午夜在线影院| 另类的小说在线视频另类成人小视频在线 | 亚洲一区二区在线观看视频| 久久国产精品色| 成人在线综合网站| 91精品福利在线一区二区三区 | 老汉av免费一区二区三区| 不卡一区二区三区四区| 欧美一级在线观看| 亚洲综合色区另类av| 国产麻豆91精品| 欧美一区二区三区播放老司机|