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

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

?? group.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
字號:
/******************************************************************************* * 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 an etched border * with an optional title. * <p> * Shadow styles are hints and may not be honoured * by the platform.  To create a group with the * default shadow style for the platform, do not * specify a shadow style. * <dl> * <dt><b>Styles:</b></dt> * <dd>SHADOW_ETCHED_IN, SHADOW_ETCHED_OUT, SHADOW_IN, SHADOW_OUT, SHADOW_NONE</dd> * <dt><b>Events:</b></dt> * <dd>(none)</dd> * </dl> * <p> * Note: Only one of the above styles may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> */public class Group extends Composite {	static final int CLIENT_INSET = 3;	static final int GroupProc;	static final TCHAR GroupClass = new TCHAR (0, OS.IsWinCE ? "BUTTON" : "SWT_GROUP", true);	static {		/*		* Feature in Windows.  The group box window class		* uses the CS_HREDRAW and CS_VREDRAW style bits to		* force a full redraw of the control and all children		* when resized.  This causes flashing.  The fix is to		* register a new window class without these bits and		* implement special code that damages only the exposed		* area.		* 		* Feature in WinCE.  On certain devices, defining		* a new window class which looks like BUTTON causes		* CreateWindowEx() to crash.  The workaround is to use		* the class Button directly.		*/		WNDCLASS lpWndClass = new WNDCLASS ();		if (OS.IsWinCE) {			OS.GetClassInfo (0, GroupClass, lpWndClass);			GroupProc = lpWndClass.lpfnWndProc;		} else {			TCHAR WC_BUTTON = new TCHAR (0, "BUTTON", true);			OS.GetClassInfo (0, WC_BUTTON, lpWndClass);			GroupProc = lpWndClass.lpfnWndProc;			int hInstance = OS.GetModuleHandle (null);			if (!OS.GetClassInfo (hInstance, GroupClass, lpWndClass)) {				int hHeap = OS.GetProcessHeap ();				lpWndClass.hInstance = hInstance;				lpWndClass.style &= ~(OS.CS_HREDRAW | OS.CS_VREDRAW);				int byteCount = GroupClass.length () * TCHAR.sizeof;				int lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);				OS.MoveMemory (lpszClassName, GroupClass, byteCount);				lpWndClass.lpszClassName = lpszClassName;				OS.RegisterClass (lpWndClass);//				OS.HeapFree (hHeap, 0, lpszClassName);			}		}	}/** * 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#SHADOW_ETCHED_IN * @see SWT#SHADOW_ETCHED_OUT * @see SWT#SHADOW_IN * @see SWT#SHADOW_OUT * @see SWT#SHADOW_NONE * @see Widget#checkSubclass * @see Widget#getStyle */public Group (Composite parent, int style) {	super (parent, checkStyle (style));}int callWindowProc (int msg, int wParam, int lParam) {	if (handle == 0) return 0;	/*	* Feature in Windows.  When the user clicks on the group	* box label, the group box takes focus.  This is unwanted.	* The fix is to avoid calling the group box window proc.	*/	switch (msg) {		case OS.WM_LBUTTONDOWN:		case OS.WM_LBUTTONDBLCLK: 			return OS.DefWindowProc (handle, msg, wParam, lParam);	}	return OS.CallWindowProc (GroupProc, handle, msg, wParam, lParam);}static int checkStyle (int style) {	style |= SWT.NO_FOCUS;	/*	* Even though it is legal to create this widget	* with scroll bars, they serve no useful purpose	* because they do not automatically scroll the	* widget's client area.  The fix is to clear	* the SWT style.	*/	return style & ~(SWT.H_SCROLL | SWT.V_SCROLL);}protected void checkSubclass () {	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);}public Rectangle computeTrim (int x, int y, int width, int height) {	checkWidget ();	Rectangle trim = super.computeTrim (x, y, width, height);	int newFont, oldFont = 0;	int hDC = OS.GetDC (handle);	newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);	if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);	TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();	OS.GetTextMetrics (hDC, tm);	int textWidth = 0;	int length = OS.GetWindowTextLength (handle);	if (length != 0) {		/*		* If the group has text, and the text is wider than the		* client area, pad the width so the text is not clipped.		*/		TCHAR buffer1 = new TCHAR (getCodePage (), length + 1);		OS.GetWindowText (handle, buffer1, length + 1);		RECT rect = new RECT ();		int flags = OS.DT_CALCRECT | OS.DT_SINGLELINE;		OS.DrawText (hDC, buffer1, length, rect, flags);		textWidth = rect.right - rect.left + CLIENT_INSET * 4;	}	if (newFont != 0) OS.SelectObject (hDC, oldFont);	OS.ReleaseDC (handle, hDC);	trim.x -= CLIENT_INSET;	trim.y -= tm.tmHeight;	trim.width = Math.max (trim.width, textWidth) + CLIENT_INSET * 2;	trim.height += tm.tmHeight + CLIENT_INSET;	return trim;}void createHandle () {	super.createHandle ();	state &= ~CANVAS;}public Rectangle getClientArea () {	checkWidget ();	forceResize ();	RECT rect = new RECT ();	OS.GetClientRect (handle, rect);	int newFont, oldFont = 0;	int hDC = OS.GetDC (handle);	newFont = OS.SendMessage (handle, OS.WM_GETFONT, 0, 0);	if (newFont != 0) oldFont = OS.SelectObject (hDC, newFont);	TEXTMETRIC tm = OS.IsUnicode ? (TEXTMETRIC) new TEXTMETRICW () : new TEXTMETRICA ();	OS.GetTextMetrics (hDC, tm);	if (newFont != 0) OS.SelectObject (hDC, oldFont);	OS.ReleaseDC (handle, hDC);	int x = CLIENT_INSET, y = tm.tmHeight;	int width = rect.right - CLIENT_INSET * 2;	int height = rect.bottom - y - CLIENT_INSET;	return new Rectangle (x, y, width, height);}String getNameText () {	return getText ();}/** * Returns the receiver's text, which is the string that the * is used as the <em>title</em>. If the text has not previously * been set, returns an empty string. * * @return the text * * @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 String getText () {	checkWidget ();	int length = OS.GetWindowTextLength (handle);	if (length == 0) return "";	TCHAR buffer = new TCHAR (getCodePage (), length + 1);	OS.GetWindowText (handle, buffer, length + 1);	return buffer.toString (0, length);}boolean mnemonicHit (char key) {	return setFocus ();}boolean mnemonicMatch (char key) {	char mnemonic = findMnemonic (getText ());	if (mnemonic == '\0') return false;	return Character.toUpperCase (key) == Character.toUpperCase (mnemonic);}/** * Sets the receiver's text, which is the string that will * be displayed as the receiver's <em>title</em>, to the argument, * which may not be null. The string may include the mnemonic character. * </p> * Mnemonics are indicated by an '&amp' that causes the next * character to be the mnemonic.  When the user presses a * key sequence that matches the mnemonic, focus is assgned * to the first child of the group. On most platforms, the * mnemonic appears underlined but may be emphasised in a * platform specific manner.  The mnemonic indicator character *'&amp' can be escaped by doubling it in the string, causing * a single '&amp' to be displayed. * </p> * @param string the new text * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the text 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> */public void setText (String string) {	checkWidget ();	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);	TCHAR buffer = new TCHAR (getCodePage (), string, true);	OS.SetWindowText (handle, buffer);}int widgetStyle () {	/*	* Bug in Windows.  When GetDCEx () is called with DCX_INTERSECTUPDATE,	* the HDC that is returned does not include the current update region.	* This was confirmed under DEBUG Windows when GetDCEx () complained about	* invalid flags.  Therefore, it is not easily possible to get an HDC from	* outside of WM_PAINT that includes the current damage and clips children.	* Because the receiver has children and draws a frame and label, it is	* necessary that the receiver always draw clipped, in the current damaged	* area.  The fix is to force the receiver to be fully clipped by including	* WS_CLIPCHILDREN and WS_CLIPSIBLINGS in the default style bits.	*/	return super.widgetStyle () | OS.BS_GROUPBOX | OS.WS_CLIPCHILDREN | OS.WS_CLIPSIBLINGS;}TCHAR windowClass () {	return GroupClass;}int windowProc () {	return GroupProc;}LRESULT WM_ERASEBKGND (int wParam, int lParam) {	LRESULT result = super.WM_ERASEBKGND (wParam, lParam);	if (result != null) return result;	/*	* Feaure in Windows.  Group boxes do not erase	* the background before drawing.  The fix is to	* fill the background.	*/	drawBackground (wParam);	return LRESULT.ONE;}LRESULT WM_NCHITTEST (int wParam, int lParam) {	LRESULT result = super.WM_NCHITTEST (wParam, lParam);	if (result != null) return result;	/*	* Feature in Windows.  The window proc for the group box	* returns HTTRANSPARENT indicating that mouse messages	* should not be delivered to the receiver and any children.	* Normally, group boxes in Windows do not have children and	* this is the correct behavior for this case.  Because we	* allow children, answer HTCLIENT to allow mouse messages	* to be delivered to the children.	*/	int code = callWindowProc (OS.WM_NCHITTEST, wParam, lParam);	if (code == OS.HTTRANSPARENT) code = OS.HTCLIENT;	return new LRESULT (code);}LRESULT WM_MOUSEMOVE (int wParam, int lParam) {	LRESULT result = super.WM_MOUSEMOVE (wParam, lParam);	if (result != null) return result;	/*	* Feature in Windows.  In version 6.00 of COMCTL32.DLL,	* every time the mouse moves, the group title redraws.	* This only happens when WM_NCHITTEST returns HTCLIENT.	* The fix is to avoid calling the group window proc.	*/	return LRESULT.ZERO;}LRESULT WM_PRINTCLIENT (int wParam, int lParam) {	LRESULT result = super.WM_PRINTCLIENT (wParam, lParam);	if (result != null) return result;	/*	* Feature in Windows.  In version 6.00 of COMCTL32.DLL,	* when WM_PRINTCLIENT is sent from a child BS_GROUP	* control to a parent BS_GROUP, the parent BS_GROUP	* clears the font from the HDC.  Normally, group boxes	* in Windows do not have children so this behavior is	* undefined.  When the parent of a BS_GROUP is not a	* BS_GROUP, there is no problem.  The fix is to save	* and restore the current font.	*/	if (OS.COMCTL32_MAJOR >= 6) {		int nSavedDC = OS.SaveDC (wParam);		int code = callWindowProc (OS.WM_PRINTCLIENT, wParam, lParam);		OS.RestoreDC (wParam, nSavedDC);		return new LRESULT (code);	}	return result;}LRESULT WM_SIZE (int wParam, int lParam) {	LRESULT result = super.WM_SIZE (wParam, lParam);	if (OS.IsWinCE) return result;	OS.InvalidateRect (handle, null, true);	return result;}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区三区四区在线观看| a在线播放不卡| 亚洲日本va午夜在线电影| 日韩精品最新网址| 色欧美日韩亚洲| 国产精品亚洲成人| 日本视频免费一区| 亚洲自拍偷拍九九九| 国产精品视频线看| 中文字幕精品三区| 日本一区二区久久| 国产精品国产a级| 国产日韩视频一区二区三区| 欧美国产综合一区二区| 国产精品少妇自拍| 国产精品久久久久婷婷| 亚洲欧美二区三区| 亚洲一级电影视频| 日日夜夜免费精品| 狠狠色狠狠色合久久伊人| 国产综合色产在线精品| 国产精品99久久久久久久vr| 国产成人高清在线| 91视视频在线观看入口直接观看www | 日本欧美一区二区三区乱码| 日韩高清在线不卡| 精品一区二区av| 国产精品一区专区| 99精品在线免费| 精品视频免费看| 精品国产电影一区二区| 国产欧美日韩在线| 中文字幕在线不卡一区二区三区| 日韩欧美一区二区免费| 精品国免费一区二区三区| 国产欧美精品一区二区色综合朱莉| 欧美日韩小视频| 欧美mv和日韩mv国产网站| 亚洲国产精品高清| 亚洲一区二区三区四区在线观看 | 亚洲不卡在线观看| 日韩国产在线观看| 国产精品白丝jk黑袜喷水| 91亚洲精品久久久蜜桃网站 | 玖玖九九国产精品| 国产伦精品一区二区三区免费迷 | 国产一区不卡在线| 色欧美88888久久久久久影院| 国产一区二区三区四区在线观看| 五月天亚洲婷婷| 国产精品一区二区久激情瑜伽| 亚洲宅男天堂在线观看无病毒| 91片在线免费观看| 欧美日韩精品欧美日韩精品一综合| 九九国产精品视频| 亚洲一区二区在线免费看| 亚洲综合色婷婷| 亚洲成国产人片在线观看| k8久久久一区二区三区| 中文字幕第一区二区| 亚洲伦在线观看| 日韩国产欧美一区二区三区| 国产成人免费高清| 日韩你懂的电影在线观看| 日韩天堂在线观看| 免费视频最近日韩| 国产精品香蕉一区二区三区| 国产成人综合自拍| 日韩精品一级二级| 青草国产精品久久久久久| 99re成人精品视频| 91麻豆精品国产91久久久| 亚洲视频在线一区| 日本道免费精品一区二区三区| 免费观看在线综合色| 欧美日韩色综合| 亚洲愉拍自拍另类高清精品| 欧美亚洲丝袜传媒另类| 午夜精品免费在线| 精品国产免费一区二区三区香蕉| 91精品在线麻豆| 国精产品一区一区三区mba视频| 国产综合色精品一区二区三区| 国产电影精品久久禁18| 欧美精品一区二区三区高清aⅴ | 日本va欧美va欧美va精品| www.色综合.com| 午夜影院久久久| 久久综合一区二区| 欧美怡红院视频| 久久99精品网久久| 成人免费小视频| 欧美疯狂性受xxxxx喷水图片| 精品久久久久久综合日本欧美| 国产精品入口麻豆九色| www.日韩在线| 亚洲欧洲中文日韩久久av乱码| 亚洲午夜精品网| 精品久久久久久久久久久久包黑料| 国产欧美视频在线观看| 97国产一区二区| 久久av资源网| 一区二区在线看| 国产午夜久久久久| 国产一区二区0| 国产三级精品在线| 日韩欧美国产麻豆| 成人美女视频在线观看18| 日本91福利区| 国产女人aaa级久久久级| 精品伦理精品一区| www国产成人| 久久久国产精品不卡| 91精品欧美福利在线观看| 91精品国产综合久久香蕉的特点| 天天综合网天天综合色| 国产精品女人毛片| 中文字幕在线观看一区| 亚洲影院久久精品| 国产精品久久久久久久第一福利 | 欧美韩日一区二区三区| 国产精品三级av| 1区2区3区精品视频| 国产日产亚洲精品系列| 精品久久五月天| 精品久久一二三区| 日韩久久久久久| 欧美成va人片在线观看| 7777精品伊人久久久大香线蕉的| 欧美日本一区二区在线观看| 欧美日韩国产影片| 成人性生交大片免费| av电影一区二区| 亚洲综合免费观看高清完整版| 成人高清伦理免费影院在线观看| caoporm超碰国产精品| 大白屁股一区二区视频| 99re免费视频精品全部| 一本大道综合伊人精品热热 | 欧美在线制服丝袜| 日韩欧美三级在线| 亚洲另类春色校园小说| 综合激情成人伊人| 久久不见久久见中文字幕免费| 国产精品污污网站在线观看| 亚洲激情欧美激情| 激情六月婷婷久久| 色老汉av一区二区三区| 欧美精品一区二区久久婷婷| 亚洲欧洲av一区二区三区久久| 精品国产在天天线2019| 午夜av一区二区| 亚洲国产综合在线| 欧美日韩一级二级| 天涯成人国产亚洲精品一区av| 中文成人av在线| 国产精品一二一区| 国产欧美日韩在线| 99久久久国产精品免费蜜臀| 17c精品麻豆一区二区免费| aaa国产一区| 亚洲色图欧洲色图婷婷| 91在线观看下载| 中文字幕一区二区三区乱码在线| 久久久久久久久久看片| 日本不卡1234视频| 欧美一区二区免费观在线| 日韩国产精品91| 欧美一级片在线看| 韩国v欧美v日本v亚洲v| 2024国产精品| 成人av免费在线播放| 亚洲你懂的在线视频| 精品在线观看免费| 欧美一区二区成人6969| 国产成人在线色| 亚洲精品v日韩精品| 91成人免费电影| 国产丝袜欧美中文另类| 国产午夜亚洲精品羞羞网站| 欧美激情一区二区三区全黄| 国产呦萝稀缺另类资源| 欧美日韩成人综合| 婷婷久久综合九色综合绿巨人| 亚洲午夜视频在线观看| 欧美日韩你懂得| 日韩vs国产vs欧美| 日韩亚洲欧美成人一区| 六月丁香综合在线视频| 日本一区二区免费在线观看视频 | 久久国产剧场电影| 精品国产伦一区二区三区免费| 久久久精品国产99久久精品芒果 | 亚洲一区视频在线| 在线播放一区二区三区| 久99久精品视频免费观看| 久久精品亚洲麻豆av一区二区| 国产女人18毛片水真多成人如厕 | 日韩精品一区二区三区中文不卡 | 亚洲一区二区三区四区五区中文 |