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

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

?? text.java

?? 源碼為Eclipse開源開發平臺桌面開發工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
/******************************************************************************* * 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.*;import org.eclipse.swt.events.*;/** * Instances of this class are selectable user interface * objects that allow the user to enter and modify text. * <p> * <dl> * <dt><b>Styles:</b></dt> * <dd>CENTER, LEFT, MULTI, PASSWORD, SINGLE, RIGHT, READ_ONLY, WRAP</dd> * <dt><b>Events:</b></dt> * <dd>DefaultSelection, Modify, Verify</dd> * </dl> * <p> * Note: Only one of the styles MULTI and SINGLE may be specified.  * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> */public class Text extends Scrollable {	int tabs, oldStart, oldEnd;	boolean doubleClick, ignoreModify, ignoreVerify, ignoreCharacter;		/**	* The maximum number of characters that can be entered	* into a text widget.	*/	public static final int LIMIT;		/**	* The delimiter used by multi-line text widgets.  When text	* is queried and from the widget, it will be delimited using	* this delimiter.	*/	public static final String DELIMITER;		/*	* This code is intentionally commented.	*///	static final char PASSWORD;		/*	* These values can be different on different platforms.	* Therefore they are not initialized in the declaration	* to stop the compiler from inlining.	*/	static {		LIMIT = OS.IsWinNT ? 0x7FFFFFFF : 0x7FFF;		DELIMITER = "\r\n";	}		static final int EditProc;	static final TCHAR EditClass = new TCHAR (0, "EDIT", true);	static {		WNDCLASS lpWndClass = new WNDCLASS ();		OS.GetClassInfo (0, EditClass, lpWndClass);		EditProc = lpWndClass.lpfnWndProc;		/*		* This code is intentionally commented.		*///		int hwndText = OS.CreateWindowEx (0,//			EditClass,//			null,//			OS.WS_OVERLAPPED | OS.ES_PASSWORD,//			0, 0, 0, 0,//			0,//			0,//			OS.GetModuleHandle (null),//			null);//		char echo = (char) OS.SendMessage (hwndText, OS.EM_GETPASSWORDCHAR, 0, 0);//		OS.DestroyWindow (hwndText);//		PASSWORD = echo != 0 ? echo : '*';	}/** * 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#SINGLE * @see SWT#MULTI * @see SWT#READ_ONLY * @see SWT#WRAP * @see Widget#checkSubclass * @see Widget#getStyle */public Text (Composite parent, int style) {	super (parent, checkStyle (style));}int callWindowProc (int msg, int wParam, int lParam) {	if (handle == 0) return 0;	return OS.CallWindowProc (EditProc, handle, msg, wParam, lParam);}void createHandle () {	super.createHandle ();	OS.SendMessage (handle, OS.EM_LIMITTEXT, 0, 0);}/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is modified, by sending * it one of the messages defined in the <code>ModifyListener</code> * interface. * * @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 ModifyListener * @see #removeModifyListener */public void addModifyListener (ModifyListener listener) {	checkWidget ();	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);	TypedListener typedListener = new TypedListener (listener);	addListener (SWT.Modify, typedListener);}/** * 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> * <code>widgetSelected</code> is not called for texts. * <code>widgetDefaultSelected</code> is typically called when ENTER is pressed in a single-line text. * </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);}/** * Adds the listener to the collection of listeners who will * be notified when the receiver's text is verified, by sending * it one of the messages defined in the <code>VerifyListener</code> * interface. * * @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 VerifyListener * @see #removeVerifyListener */public void addVerifyListener (VerifyListener listener) {	checkWidget ();	if (listener == null) error (SWT.ERROR_NULL_ARGUMENT);	TypedListener typedListener = new TypedListener (listener);	addListener (SWT.Verify, typedListener);}/** * Appends a string. * <p> * The new text is appended to the text at * the end of the widget. * </p> * * @param string the string to be appended * * @exception IllegalArgumentException <ul> *    <li>ERROR_NULL_ARGUMENT - if the string 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 append (String string) {	checkWidget ();	if (string == null) error (SWT.ERROR_NULL_ARGUMENT);	string = Display.withCrLf (string);	int length = OS.GetWindowTextLength (handle);	if (hooks (SWT.Verify) || filters (SWT.Verify)) {		string = verifyText (string, length, length, null);		if (string == null) return;	}	OS.SendMessage (handle, OS.EM_SETSEL, length, length);	TCHAR buffer = new TCHAR (getCodePage (), string, true);	/*	* Feature in Windows.  When an edit control with ES_MULTILINE	* style that does not have the WS_VSCROLL style is full (i.e.	* there is no space at the end to draw any more characters),	* EM_REPLACESEL sends a WM_CHAR with a backspace character	* to remove any further text that is added.  This is an	* implementation detail of the edit control that is unexpected	* and can cause endless recursion when EM_REPLACESEL is sent	* from a WM_CHAR handler.  The fix is to ignore calling the	* handler from WM_CHAR.	*/	ignoreCharacter = true;	OS.SendMessage (handle, OS.EM_REPLACESEL, 0, buffer);	ignoreCharacter = false;	OS.SendMessage (handle, OS.EM_SCROLLCARET, 0, 0);}static int checkStyle (int style) {	style = checkBits (style, SWT.LEFT, SWT.CENTER, SWT.RIGHT, 0, 0, 0);	if ((style & SWT.SINGLE) != 0) style &= ~(SWT.H_SCROLL | SWT.V_SCROLL | SWT.WRAP);	if ((style & SWT.WRAP) != 0) style |= SWT.MULTI;	if ((style & SWT.MULTI) != 0) style &= ~SWT.PASSWORD;	if ((style & (SWT.SINGLE | SWT.MULTI)) != 0) return style;	if ((style & (SWT.H_SCROLL | SWT.V_SCROLL)) != 0) return style | SWT.MULTI;	return style | SWT.SINGLE;}/** * Clears the selection. * * @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 clearSelection () {	checkWidget ();	if (OS.IsWinCE) {		/*		* Bug in WinCE.  Calling EM_SETSEL with -1 and 0 is equivalent		* to calling EM_SETSEL with 0 and -1.  It causes the entire		* text to be selected instead of clearing the selection.  The		* fix is to set the start of the selection to the  end of the		* current selection.		*/ 		int [] end = new int [1];		OS.SendMessage (handle, OS.EM_GETSEL, (int []) null, end);		OS.SendMessage (handle, OS.EM_SETSEL, end [0], end [0]);	} else {		OS.SendMessage (handle, OS.EM_SETSEL, -1, 0);	}}public Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget ();	int height = 0, width = 0;	if (wHint == SWT.DEFAULT || hHint == SWT.DEFAULT) {		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 count = OS.SendMessage (handle, OS.EM_GETLINECOUNT, 0, 0);		height = count * tm.tmHeight;		RECT rect = new RECT ();		int flags = OS.DT_CALCRECT | OS.DT_EDITCONTROL | OS.DT_NOPREFIX;		boolean wrap = (style & SWT.MULTI) != 0 && (style & SWT.WRAP) != 0;		if (wrap && wHint != SWT.DEFAULT) {			flags |= OS.DT_WORDBREAK;			rect.right = wHint;		}		String text = getText ();		TCHAR buffer = new TCHAR (getCodePage (), text, false);		int length = buffer.length ();		if (length != 0) {			OS.DrawText (hDC, buffer, length, rect, flags); 			width = rect.right - rect.left;		}		if (wrap && hHint == SWT.DEFAULT) {			int newHeight = rect.bottom - rect.top;			if (newHeight != 0) height = newHeight;		}		if (newFont != 0) OS.SelectObject (hDC, oldFont);		OS.ReleaseDC (handle, hDC);	}	if (width == 0) width = DEFAULT_WIDTH;	if (height == 0) height = DEFAULT_HEIGHT;	if (wHint != SWT.DEFAULT) width = wHint;	if (hHint != SWT.DEFAULT) height = hHint;	/* Calculate the margin width */	int margins = OS.SendMessage(handle, OS.EM_GETMARGINS, 0, 0);	int marginWidth = (margins & 0xFFFF) + ((margins >> 16) & 0xFFFF);	width += marginWidth;	/*	* The preferred height of a single-line text widget	* has been hand-crafted to be the same height as	* the single-line text widget in an editable combo	* box.	*/	if ((style & SWT.V_SCROLL) != 0) {		width += OS.GetSystemMetrics (OS.SM_CXVSCROLL);	}	if ((style & SWT.H_SCROLL) != 0) {		height += OS.GetSystemMetrics (OS.SM_CYHSCROLL);		if ((style & SWT.BORDER) == 0) width++;	}	if ((style & SWT.BORDER) != 0) {		int border = getBorderWidth ();		width += (border * 2) + 3;		height += (border * 2) + 3;	}	return new Point (width, height);}/** * Copies the selected text. * <p> * The current selection is copied to the clipboard. * </p> * * @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 copy () {	checkWidget ();	OS.SendMessage (handle, OS.WM_COPY, 0, 0);}void createWidget () {	super.createWidget ();	doubleClick = true;	setTabStops (tabs = 8);	fixAlignment ();}/** * Cuts the selected text. * <p> * The current selection is first copied to the * clipboard and then deleted from the widget. * </p> * * @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 cut () {	checkWidget ();	OS.SendMessage (handle, OS.WM_CUT, 0, 0);}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品国产a毛片| 99精品国产视频| 亚洲人xxxx| 精品成a人在线观看| 欧美性大战xxxxx久久久| 黄色日韩网站视频| 视频在线在亚洲| 亚洲欧美日韩人成在线播放| 久久久www免费人成精品| 欧美精品一卡两卡| 91蜜桃在线免费视频| 国产在线乱码一区二区三区| 伊人开心综合网| 国产精品免费aⅴ片在线观看| 欧美一区二区大片| 在线一区二区三区四区五区 | 伊人性伊人情综合网| 亚洲精品一区二区在线观看| 777奇米四色成人影色区| 色综合天天天天做夜夜夜夜做| 国产精品99久久久久久久女警 | av在线不卡观看免费观看| 久久激情综合网| 美腿丝袜亚洲三区| 日韩在线卡一卡二| 亚洲成人激情自拍| 亚洲国产日韩av| 亚洲国产另类av| 亚洲综合成人在线| 亚洲综合av网| 午夜久久久影院| 午夜精品一区二区三区免费视频 | 国产一区在线精品| 经典三级视频一区| 精品一区二区三区在线播放| 九九九精品视频| 美女视频一区在线观看| 免播放器亚洲一区| 另类人妖一区二区av| 美女视频黄免费的久久| 久久成人av少妇免费| 另类成人小视频在线| 久久超碰97中文字幕| 国产毛片精品视频| 高清国产午夜精品久久久久久| 丁香婷婷综合五月| 97久久精品人人做人人爽 | 欧美成人一区二区三区片免费| 宅男在线国产精品| 欧美xxxxx裸体时装秀| 日韩精品一区在线| 国产天堂亚洲国产碰碰| 中文字幕一区二区三区色视频| 综合欧美亚洲日本| 亚洲妇女屁股眼交7| 免费在线观看不卡| 高清视频一区二区| 91久久奴性调教| 在线播放中文一区| 2021中文字幕一区亚洲| 国产精品久久久久久久久久免费看 | 久久综合国产精品| 欧美国产日韩亚洲一区| 亚洲一区二区三区在线| 麻豆国产91在线播放| 成人综合在线观看| 在线观看日韩电影| 精品久久久久久亚洲综合网| 中文字幕第一区综合| 亚洲午夜一区二区三区| 精品在线观看视频| 不卡大黄网站免费看| 欧美三电影在线| 日韩免费电影一区| 国产精品全国免费观看高清| 亚洲综合区在线| 国产精品一级黄| 欧洲精品在线观看| 久久亚洲欧美国产精品乐播| 亚洲男人的天堂av| 国内精品国产成人国产三级粉色| 色综合天天综合网天天看片 | 国产精品国产自产拍高清av王其| 亚洲伊人伊色伊影伊综合网| 国产在线视频精品一区| 欧美影院一区二区| 国产午夜亚洲精品理论片色戒| 亚洲精品视频在线观看网站| 精品影视av免费| 欧美视频完全免费看| 亚洲国产精品成人综合色在线婷婷| 亚洲一区国产视频| 国产91精品精华液一区二区三区| 在线不卡一区二区| 亚洲精选一二三| 成人激情校园春色| 日韩一区二区三区观看| 亚洲精品成人天堂一二三| 国产九色sp调教91| 日韩午夜在线观看| 亚洲一区二区三区在线| 99久久精品免费精品国产| 久久综合丝袜日本网| 三级影片在线观看欧美日韩一区二区| www.av精品| 久久伊人蜜桃av一区二区| 日韩国产一区二| 欧美日韩免费一区二区三区| 亚洲欧洲三级电影| 国产麻豆精品视频| 日韩欧美国产一二三区| 婷婷激情综合网| 色94色欧美sute亚洲线路一久| 国产精品欧美精品| 国产一区二区三区在线观看免费视频| 欧美一区二区三区视频免费| 一区二区三区国产豹纹内裤在线| av在线免费不卡| 欧美国产视频在线| 国产成人精品一区二| 久久久91精品国产一区二区精品| 奇米综合一区二区三区精品视频| 欧美亚洲综合色| 亚洲自拍偷拍麻豆| 欧美午夜一区二区三区| 亚洲美女在线一区| 色94色欧美sute亚洲13| 亚洲毛片av在线| 色av综合在线| 亚洲综合免费观看高清完整版| 在线免费观看日本一区| 亚洲一区二区三区在线| 欧美日韩中文一区| 日韩和欧美一区二区| 欧美精品日韩精品| 日韩电影免费一区| 欧美成人一区二区三区片免费 | 九九**精品视频免费播放| 日韩一区二区三区视频在线 | 欧美一区二区三区在| 婷婷六月综合网| 日韩精品影音先锋| 国产盗摄一区二区| 国产精品三级久久久久三级| 91碰在线视频| 午夜不卡av在线| 在线电影院国产精品| 久久国产精品99精品国产| 精品国产免费人成电影在线观看四季| 麻豆成人免费电影| 久久青草欧美一区二区三区| 成人在线一区二区三区| 亚洲欧洲精品一区二区三区不卡| 91小视频在线观看| 亚洲成av人片在线观看| 日韩免费视频线观看| 国产一区二区精品在线观看| 国产精品免费久久| 欧美日韩在线一区二区| 美女一区二区久久| 国产精品萝li| 欧美日韩卡一卡二| 久久电影网站中文字幕| 中文字幕 久热精品 视频在线| 91成人国产精品| 另类小说一区二区三区| 亚洲欧美在线视频| 91精品国产综合久久福利软件 | 国产毛片精品视频| 亚洲欧美另类图片小说| 91精品国产黑色紧身裤美女| 国产一区二区三区精品视频| 国产欧美日韩久久| 欧美午夜视频网站| 国产在线视视频有精品| 一区二区三区精品在线| 欧美一区二区国产| 91亚洲大成网污www| 蜜桃一区二区三区在线观看| 一区二区中文视频| 日韩一区国产二区欧美三区| jlzzjlzz欧美大全| 久久国产视频网| 亚洲理论在线观看| 久久伊99综合婷婷久久伊| 欧美午夜精品久久久| 国产 日韩 欧美大片| 蜜臀av一级做a爰片久久| 亚洲免费三区一区二区| 精品欧美乱码久久久久久 | 日本一区二区在线不卡| 欧美日韩国产综合视频在线观看| 高清久久久久久| 免费观看成人鲁鲁鲁鲁鲁视频| 亚洲免费av观看| 亚洲国产高清在线观看视频| 日韩午夜小视频| 欧美日韩视频在线第一区| 成人毛片在线观看| 久久电影网站中文字幕|