亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产99久久精品| 五月天婷婷综合| 色婷婷亚洲精品| 99久久精品国产毛片| 日韩福利视频导航| 欧美国产日韩亚洲一区| 亚洲女人****多毛耸耸8| 亚洲欧美一区二区三区国产精品 | 亚洲精品ww久久久久久p站| 亚洲国产中文字幕| 丝袜美腿亚洲综合| 91色综合久久久久婷婷| 午夜精品久久久久久久蜜桃app| 国产精品色哟哟| 亚洲国产精品久久久男人的天堂| 精品国产免费人成电影在线观看四季| 91蜜桃在线免费视频| 激情都市一区二区| 日本韩国精品在线| 国产成人精品亚洲777人妖 | 91在线观看成人| 精品一区二区三区久久久| 亚洲一区二区三区四区不卡| 粉嫩欧美一区二区三区高清影视| 免费成人性网站| 日韩你懂的在线观看| 国产精品三级av在线播放| 欧美成人官网二区| 精品日本一线二线三线不卡| 欧美在线一区二区三区| 欧美在线观看你懂的| 欧美日韩精品专区| 日韩精品电影一区亚洲| 一区二区三区四区激情| 三级精品在线观看| 午夜电影网亚洲视频| 亚洲国产欧美在线| 日韩综合小视频| 麻豆精品新av中文字幕| 日韩成人免费看| 亚洲自拍偷拍网站| 五月婷婷激情综合| 久久99久久精品| 激情六月婷婷综合| 国产精品一区免费视频| 国产美女av一区二区三区| 国产精品一区在线观看乱码| 韩日av一区二区| 日本aⅴ精品一区二区三区| 午夜a成v人精品| 亚洲成人自拍偷拍| 一二三区精品福利视频| 亚洲一区二区三区小说| 亚洲电影中文字幕在线观看| 亚洲国产日产av| 全部av―极品视觉盛宴亚洲| 久久激情综合网| 日本二三区不卡| 欧美精品v国产精品v日韩精品| 国产98色在线|日韩| 91啦中文在线观看| 日韩午夜电影在线观看| 欧美性猛交xxxxxxxx| 国产成人亚洲精品青草天美| 成人av在线网| 欧美日韩aaaaaa| 欧美大片国产精品| 国产精品久久久久久久久免费丝袜| 亚洲女与黑人做爰| 另类小说综合欧美亚洲| 国产自产视频一区二区三区| 91麻豆国产香蕉久久精品| 精品国产一区二区三区四区四| 国产精品久久久久久久浪潮网站| 亚洲电影中文字幕在线观看| 精品一区二区在线免费观看| 色94色欧美sute亚洲线路二| 91久久精品一区二区| 亚洲精品在线网站| 天堂一区二区在线| 高清不卡一区二区| 91精品一区二区三区久久久久久| 日韩美女精品在线| 亚洲精品国产品国语在线app| 国产精品久久久久影院老司 | 51午夜精品国产| 国产精品国产三级国产a| 视频在线观看国产精品| 成人久久视频在线观看| 欧美精品三级日韩久久| 久久久久久久一区| 免费在线看一区| 福利一区二区在线| 国产成人综合视频| 91丨porny丨国产入口| 欧美三级视频在线| 欧美日本乱大交xxxxx| 国产日韩欧美激情| 亚洲午夜久久久久久久久电影网| 成人毛片老司机大片| 精品国产免费久久| 精品一区二区三区在线观看 | 欧美军同video69gay| 亚洲狠狠丁香婷婷综合久久久| 国产成人午夜高潮毛片| 国产欧美日韩三区| 国产suv一区二区三区88区| 日韩视频免费直播| 国产精品免费视频观看| 成人毛片在线观看| 国产精品成人在线观看| 成人av影视在线观看| 国产欧美日韩视频一区二区 | 欧美剧在线免费观看网站| 婷婷国产v国产偷v亚洲高清| 欧美老人xxxx18| 日日骚欧美日韩| 欧美视频一二三区| ...xxx性欧美| 日韩精品成人一区二区三区| 成人免费视频app| 国产清纯白嫩初高生在线观看91| 99国产精品久久久久| 在线看一区二区| 伊人色综合久久天天人手人婷| 久久成人麻豆午夜电影| 制服丝袜av成人在线看| 免费观看久久久4p| 欧美日本韩国一区| 亚洲欧洲国产日韩| 日韩精品色哟哟| 在线综合视频播放| 国产婷婷色一区二区三区四区| 一区二区三区四区五区视频在线观看| 色婷婷av一区二区三区软件| 亚洲日韩欧美一区二区在线| 97se亚洲国产综合在线| 亚洲欧美日韩一区二区 | 精品日产卡一卡二卡麻豆| 成人午夜私人影院| 亚洲成av人片一区二区梦乃| 欧美一区二区国产| 国产成人在线视频免费播放| 亚洲国产成人av网| 久久久精品2019中文字幕之3| 一本大道久久a久久综合婷婷| 亚洲国产视频一区二区| 精品理论电影在线观看| 波多野结衣亚洲一区| 午夜精品一区二区三区免费视频| 欧美白人最猛性xxxxx69交| 99在线精品观看| 久久精品国产久精国产| 亚洲欧美中日韩| 91精品久久久久久蜜臀| 成人白浆超碰人人人人| 蜜臀av国产精品久久久久| 国产精品国产三级国产普通话三级| 欧美无砖专区一中文字| 国产精品18久久久久久久久久久久| 亚洲精品免费在线观看| 精品国产91乱码一区二区三区 | 久久99国内精品| 一区二区三区四区在线免费观看 | 韩国成人福利片在线播放| 亚洲一二三级电影| 最新国产精品久久精品| 久久伊99综合婷婷久久伊| 午夜视频在线观看一区| 国产精品久久久久天堂| 日韩欧美在线1卡| 在线观看国产一区二区| 成人一区二区三区中文字幕| 日韩电影免费在线| 亚洲在线一区二区三区| 国产欧美一区二区三区在线老狼| 欧美猛男gaygay网站| 成人国产一区二区三区精品| 久久av老司机精品网站导航| 亚洲不卡在线观看| 一个色综合网站| 亚洲日本丝袜连裤袜办公室| 国产欧美综合在线| 中文字幕精品一区二区三区精品| 久久综合九色综合久久久精品综合| 欧美日韩午夜在线视频| 欧洲av一区二区嗯嗯嗯啊| 91激情五月电影| 一本高清dvd不卡在线观看| 成人精品国产免费网站| 成人福利在线看| thepron国产精品| 成人毛片在线观看| 国产成人精品免费看| 成人avav影音| aaa欧美日韩| 欧美日韩精品是欧美日韩精品| 日本韩国一区二区三区视频| 91成人在线精品| 欧洲色大大久久|