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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? tabfolder.java

?? 源碼為Eclipse開源開發(fā)平臺桌面開發(fā)工具SWT的源代碼,
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/******************************************************************************* * 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 implement the notebook user interface * metaphor.  It allows the user to select a notebook page from * set of pages. * <p> * The item children that may be added to instances of this class * must be of type <code>TabItem</code>. * <code>Control</code> children are created and then set into a * tab item using <code>TabItem#setControl</code>. * </p><p> * Note that although this class is a subclass of <code>Composite</code>, * it does not make sense to set a layout on it. * </p><p> * <dl> * <dt><b>Styles:</b></dt> * <dd>TOP, BOTTOM</dd> * <dt><b>Events:</b></dt> * <dd>Selection</dd> * </dl> * <p> * Note: Only one of the styles TOP and BOTTOM may be specified. * </p><p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> */public class TabFolder extends Composite {	TabItem [] items;	ImageList imageList;	static final int TabFolderProc;	static final TCHAR TabFolderClass = new TCHAR (0, OS.WC_TABCONTROL, true);		/*	* These are the undocumented control id's for the children of	* a tab control.  Since there are no constants for these values,	* they may change with different versions of Windows.	*/	static final int ID_UPDOWN = 1;		static {		WNDCLASS lpWndClass = new WNDCLASS ();		OS.GetClassInfo (0, TabFolderClass, lpWndClass);		TabFolderProc = lpWndClass.lpfnWndProc;		/*		* Feature in Windows.  The tab control 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.		* 		* NOTE:  Screen readers look for the exact class name		* of the control in order to provide the correct kind		* of assistance.  Therefore, it is critical that the		* new window class have the same name.  It is possible		* to register a local window class with the same name		* as a global class.  Since bits that affect the class		* are being changed, it is possible that other native		* code, other than SWT, could create a control with		* this class name, and fail unexpectedly.		*/		int hInstance = OS.GetModuleHandle (null);		int hHeap = OS.GetProcessHeap ();		lpWndClass.hInstance = hInstance;		lpWndClass.style &= ~(OS.CS_HREDRAW | OS.CS_VREDRAW | OS.CS_GLOBALCLASS);		int byteCount = TabFolderClass.length () * TCHAR.sizeof;		int lpszClassName = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);		OS.MoveMemory (lpszClassName, TabFolderClass, 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 * @see Widget#checkSubclass * @see Widget#getStyle */public TabFolder (Composite parent, int style) {	super (parent, checkStyle (style));}/** * Adds the listener to the collection of listeners who will * be notified when the receiver's selection changes, by sending * it one of the messages defined in the <code>SelectionListener</code> * interface. * <p> * When <code>widgetSelected</code> is called, the item field of the event object is valid. * <code>widgetDefaultSelected</code> is not called. * </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);}int callWindowProc (int msg, int wParam, int lParam) {	if (handle == 0) return 0;	return OS.CallWindowProc (TabFolderProc, handle, msg, wParam, lParam);}static int checkStyle (int style) {	style = checkBits (style, SWT.TOP, SWT.BOTTOM, 0, 0, 0, 0);	/*	* 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 Point computeSize (int wHint, int hHint, boolean changed) {	checkWidget ();	RECT insetRect = new RECT (), itemRect = new RECT ();	OS.SendMessage (handle, OS.TCM_ADJUSTRECT, 0, insetRect);	int width = insetRect.left - insetRect.right, height = 0;	int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);	if (count != 0) {		OS.SendMessage (handle, OS.TCM_GETITEMRECT, count - 1, itemRect);		width = Math.max (width, itemRect.right - insetRect.right);	}	Point size = null;	if (layout != null) {		size = layout.computeSize (this, wHint, hHint, changed);	} else {		size = minimumSize (wHint, hHint, changed);	}	if (size.x == 0) size.x = DEFAULT_WIDTH;	if (size.y == 0) size.y = DEFAULT_HEIGHT;	if (wHint != SWT.DEFAULT) size.x = wHint;	if (hHint != SWT.DEFAULT) size.y = hHint;	width = Math.max (width, size.x);	height = Math.max (height, size.y);	Rectangle trim = computeTrim (0, 0, width, height);	width = trim.width;  height = trim.height;	return new Point (width, height);}public Rectangle computeTrim (int x, int y, int width, int height) {	checkWidget ();	RECT rect = new RECT ();	OS.SetRect (rect, x, y, x + width, y + height);	OS.SendMessage (handle, OS.TCM_ADJUSTRECT, 1, rect);	int border = getBorderWidth ();	rect.left -= border;  rect.right += border;	rect.top -= border;  rect.bottom += border;	int newWidth = rect.right - rect.left;	int newHeight = rect.bottom - rect.top;	return new Rectangle (rect.left, rect.top, newWidth, newHeight);}void createItem (TabItem item, int index) {	int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);	if (!(0 <= index && index <= count)) error (SWT.ERROR_INVALID_RANGE);	if (count == items.length) {		TabItem [] newItems = new TabItem [items.length + 4];		System.arraycopy (items, 0, newItems, 0, items.length);		items = newItems;	}	TCITEM tcItem = new TCITEM ();	if (OS.SendMessage (handle, OS.TCM_INSERTITEM, index, tcItem) == -1) {		error (SWT.ERROR_ITEM_NOT_ADDED);	}	System.arraycopy (items, index, items, index + 1, count - index);	items [index] = item;		/*	* Send a selection event when the item that is added becomes	* the new selection.  This only happens when the first item	* is added.	*/	if (count == 0) {		Event event = new Event ();		event.item = items [0];		sendEvent (SWT.Selection, event);		// the widget could be destroyed at this point	}}void createHandle () {	super.createHandle ();	state &= ~CANVAS;	/*	* Feature in Windows.  Despite the fact that the	* tool tip text contains \r\n, the tooltip will	* not honour the new line unless TTM_SETMAXTIPWIDTH	* is set.  The fix is to set TTM_SETMAXTIPWIDTH to	* a large value.	*/	int hwndToolTip = OS.SendMessage (handle, OS.TCM_GETTOOLTIPS, 0, 0);	OS.SendMessage (hwndToolTip, OS.TTM_SETMAXTIPWIDTH, 0, 0x7FFF);}void createWidget () {	super.createWidget ();	items = new TabItem [4];}void destroyItem (TabItem item) {	int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);	int index = 0;	while (index < count) {		if (items [index] == item) break;		index++;	}	if (index == count) return;	int selectionIndex = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);	if (OS.SendMessage (handle, OS.TCM_DELETEITEM, index, 0) == 0) {		error (SWT.ERROR_ITEM_NOT_REMOVED);	}	System.arraycopy (items, index + 1, items, index, --count - index);	items [count] = null;	if (count == 0) {		if (imageList != null) {			OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, 0);			display.releaseImageList (imageList);		}		imageList = null;		items = new TabItem [4];	}	if (count > 0 && index == selectionIndex) {		setSelection (Math.max (0, selectionIndex - 1), true);	}}public Rectangle getClientArea () {	checkWidget ();	forceResize ();	RECT rect = new RECT ();	OS.GetClientRect (handle, rect);	OS.SendMessage (handle, OS.TCM_ADJUSTRECT, 0, rect);	int width = rect.right - rect.left;	int height = rect.bottom - rect.top;	return new Rectangle (rect.left, rect.top, width, height);}/** * 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 TabItem getItem (int index) {	checkWidget ();	int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);	if (!(0 <= index && index < count)) error (SWT.ERROR_INVALID_RANGE);	return items [index];}/** * 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 OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);}/** * Returns an array of <code>TabItem</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 TabItem [] getItems () {	checkWidget ();	int count = OS.SendMessage (handle, OS.TCM_GETITEMCOUNT, 0, 0);	TabItem [] result = new TabItem [count];	System.arraycopy (items, 0, result, 0, count);	return result;}/** * Returns an array of <code>TabItem</code>s that are currently * selected in the receiver. An empty array indicates that no * items are selected. * <p> * Note: This is not the actual structure used by the receiver * to maintain its selection, so modifying the array will * not affect the receiver.  * </p> * @return an array representing 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 TabItem [] getSelection () {	checkWidget ();	int index = OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);	if (index == -1) return new TabItem [0];	return new TabItem [] {items [index]};}/** * Returns the zero-relative index of the item which is currently * selected in the receiver, or -1 if no item is selected. * * @return the index of the selected 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 int getSelectionIndex () {	checkWidget ();	return OS.SendMessage (handle, OS.TCM_GETCURSEL, 0, 0);}int imageIndex (Image image) {	if (image == null) return OS.I_IMAGENONE;	if (imageList == null) {		Rectangle bounds = image.getBounds ();		imageList = display.getImageList (new Point (bounds.width, bounds.height));		int index = imageList.indexOf (image);		if (index == -1) index = imageList.add (image);		int hImageList = imageList.getHandle ();		OS.SendMessage (handle, OS.TCM_SETIMAGELIST, 0, hImageList);		return index;	}	int index = imageList.indexOf (image);	if (index != -1) return index;	return imageList.add (image);}/** * Searches the receiver's list starting at the first item * (index 0) until an item is found that is equal to the  * argument, and returns the index of that item. If no item * is found, returns -1. * * @param item the search item

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久精品国产一区二区三区免费看| 国产欧美视频一区二区| 一区二区免费在线播放| 国产.欧美.日韩| 国产日韩视频一区二区三区| 国产一区二区三区电影在线观看| 国产乱一区二区| 欧美国产日韩亚洲一区| 91女厕偷拍女厕偷拍高清| 亚洲欧洲日韩综合一区二区| av电影在线观看一区| 一区二区三区精密机械公司| 欧美少妇bbb| 麻豆国产欧美日韩综合精品二区 | 国产亚洲一区二区在线观看| 国产激情一区二区三区桃花岛亚洲| 久久久久久久久99精品| 国产成人亚洲综合a∨婷婷 | 欧洲激情一区二区| 青草av.久久免费一区| 精品日韩成人av| 成人性视频网站| 亚洲一区二区影院| 日韩你懂的电影在线观看| 高清av一区二区| 亚洲综合色区另类av| 日韩视频一区二区三区| 成人小视频在线观看| 亚洲成在人线在线播放| 久久精品一区二区三区四区| 日本精品视频一区二区| 久久精品免费看| 国产精品久久久久久久久久久免费看 | 国产精品欧美一区二区三区| 欧亚洲嫩模精品一区三区| 久色婷婷小香蕉久久| 亚洲欧美怡红院| 日韩一级片网址| 91论坛在线播放| 捆绑变态av一区二区三区| 亚洲精品中文字幕乱码三区 | 精品影视av免费| 亚洲精品老司机| 久久久久亚洲综合| 欧美男生操女生| 成人在线综合网| 肉色丝袜一区二区| 一区二区在线观看视频在线观看| 精品动漫一区二区三区在线观看| 色妞www精品视频| 国产91在线看| 久久er精品视频| 五月天国产精品| 一区二区在线免费观看| 国产人成一区二区三区影院| 日韩欧美中文字幕制服| 欧美三级资源在线| 色综合久久久久综合99| 国产大片一区二区| 久久不见久久见免费视频1| 午夜精彩视频在线观看不卡| 1000部国产精品成人观看| 久久久久久影视| 日韩精品中文字幕在线不卡尤物| 91色porny| 成人av免费在线观看| 国产一区二区三区精品视频| 久久99久久精品欧美| 免费精品99久久国产综合精品| 一级女性全黄久久生活片免费| 国产精品久久久久久久午夜片| 精品国产人成亚洲区| 欧美一二三区在线| 欧美性色欧美a在线播放| 99国产精品久久久久久久久久久 | 午夜精品久久一牛影视| 亚洲精品第1页| 一区二区久久久久| 亚洲黄色小说网站| 欧美影院精品一区| 国产精品高清亚洲| 国产精品久久久一本精品| 亚洲国产cao| 日韩精品一区二区三区在线| 欧美日韩精品久久久| 欧美日韩免费观看一区三区| 日本高清免费不卡视频| 在线日韩av片| 欧美色精品在线视频| 欧美一区二区美女| www亚洲一区| 中文字幕精品综合| ●精品国产综合乱码久久久久| 亚洲靠逼com| 日韩 欧美一区二区三区| 久久69国产一区二区蜜臀| 国模少妇一区二区三区| 成人午夜精品在线| 在线一区二区三区做爰视频网站| 欧美色图在线观看| 欧美大胆一级视频| 中文字幕不卡一区| 一区二区三区欧美在线观看| 亚洲成人福利片| 久久精品噜噜噜成人av农村| 狠狠色丁香久久婷婷综合丁香| 成人一道本在线| 欧美日本一区二区三区| 日韩欧美视频一区| 欧美国产欧美综合| 午夜成人免费视频| 国产99久久久国产精品潘金网站| 91蜜桃免费观看视频| 91精品福利在线一区二区三区| 久久欧美中文字幕| 亚洲综合精品久久| 韩国欧美国产1区| 日韩欧美卡一卡二| 亚洲成av人片| 国产一区二区在线看| 99久久99久久精品免费观看| 久久看人人爽人人| 日韩和的一区二区| 国产精品12区| 欧美一二三区在线观看| 亚洲一区二区精品视频| 国产精品自拍一区| 51精品视频一区二区三区| 国产精品短视频| 蜜臀久久久久久久| 不卡影院免费观看| 日韩色视频在线观看| 亚洲天堂成人网| 国产一区二区美女诱惑| 欧美午夜电影网| 精品国产第一区二区三区观看体验| 中文字幕免费不卡| 美腿丝袜亚洲综合| 欧美日韩午夜影院| 亚洲欧美成人一区二区三区| 日本亚洲电影天堂| 欧美丰满一区二区免费视频| 中文字幕日韩精品一区| 国产做a爰片久久毛片| 666欧美在线视频| 亚洲丰满少妇videoshd| 99久久精品国产导航| 国产精品二三区| 国产原创一区二区三区| 精品盗摄一区二区三区| 美女视频黄免费的久久| 日韩亚洲欧美成人一区| av成人老司机| 亚洲与欧洲av电影| 91一区二区在线| 国产精品三级av| 福利一区二区在线| ㊣最新国产の精品bt伙计久久| 国产伦精品一区二区三区免费 | 欧美在线不卡一区| 欧美精品色一区二区三区| 国产精品99久久久久久有的能看| 久久成人久久爱| 在线精品视频一区二区三四 | 国产精品人成在线观看免费| 国内精品久久久久影院色 | 日韩免费高清视频| 首页亚洲欧美制服丝腿| 欧美色倩网站大全免费| 亚洲成a人片在线不卡一二三区| 色综合一个色综合| 亚洲女性喷水在线观看一区| 91丨九色丨黑人外教| 亚洲欧美激情在线| 91久久精品一区二区| 一区二区三区91| 欧美日韩一区小说| 天天av天天翘天天综合网| 69久久夜色精品国产69蝌蚪网| 视频一区在线播放| 欧美一区二区播放| 久久精品国产一区二区| 欧美精品一区二区久久婷婷| 国产一区二区不卡在线| 国产欧美视频一区二区三区| 99这里只有久久精品视频| 亚洲情趣在线观看| 欧美日韩国产综合久久| 日韩不卡手机在线v区| 久久综合色播五月| 99精品欧美一区二区三区综合在线| **性色生活片久久毛片| 欧美久久免费观看| 久久99久久99小草精品免视看| 国产清纯美女被跳蛋高潮一区二区久久w | 国产午夜久久久久| 99久久99久久免费精品蜜臀| 亚洲制服丝袜av| 欧美一区二区私人影院日本| 国产精品一卡二卡|