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

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

?? treeitem.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.*;/** * Instances of this class represent a selectable user interface object * that represents a hierarchy of tree items in a tree widget. *  * <dl> * <dt><b>Styles:</b></dt> * <dd>(none)</dd> * <dt><b>Events:</b></dt> * <dd>(none)</dd> * </dl> * <p> * IMPORTANT: This class is <em>not</em> intended to be subclassed. * </p> */public class TreeItem extends Item {	/**	 * the handle to the OS resource 	 * (Warning: This field is platform dependent)	 */		public int handle;		Tree parent;	int background, foreground;	int font;	/** * Constructs a new instance of this class given its parent * (which must be a <code>Tree</code> or a <code>TreeItem</code>) * and a style value describing its behavior and appearance. * The item is added to the end of the items maintained by its parent. * <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 TreeItem (Tree parent, int style) {	super (parent, style);	this.parent = parent;	parent.createItem (this, 0, OS.TVI_LAST);}/** * Constructs a new instance of this class given its parent * (which must be a <code>Tree</code> or a <code>TreeItem</code>), * a style value describing its behavior and appearance, and the index * at which to place it in the items maintained by its parent. * <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 * @param index the index to store the receiver in its parent * * @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 TreeItem (Tree parent, int style, int index) {	super (parent, style);	if (index < 0) error (SWT.ERROR_INVALID_RANGE);	this.parent = parent;	int hItem = OS.TVI_FIRST;	if (index != 0) {		int count = 1, hwnd = parent.handle;		hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_ROOT, 0);		while (hItem != 0 && count < index) {			hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);			count++;		}		if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);	}	parent.createItem (this, 0, hItem);}/** * Constructs a new instance of this class given its parent * (which must be a <code>Tree</code> or a <code>TreeItem</code>) * and a style value describing its behavior and appearance. * The item is added to the end of the items maintained by its parent. * <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 parentItem 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 TreeItem (TreeItem parentItem, int style) {	super (checkNull (parentItem).parent, style);	parent = parentItem.parent;	int hItem = parentItem.handle;	parent.createItem (this, hItem, OS.TVI_LAST);}/** * Constructs a new instance of this class given its parent * (which must be a <code>Tree</code> or a <code>TreeItem</code>), * a style value describing its behavior and appearance, and the index * at which to place it in the items maintained by its parent. * <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 parentItem a composite control which will be the parent of the new instance (cannot be null) * @param style the style of control to construct * @param index the index to store the receiver in its parent * * @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 TreeItem (TreeItem parentItem, int style, int index) {	super (checkNull (parentItem).parent, style);	if (index < 0) error (SWT.ERROR_INVALID_RANGE);	parent = parentItem.parent;	int hItem = OS.TVI_FIRST;	int hParent = parentItem.handle;	if (index != 0) {		int count = 1, hwnd = parent.handle;		hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_CHILD, hParent);		while (hItem != 0 && count < index) {			hItem = OS.SendMessage (hwnd, OS.TVM_GETNEXTITEM, OS.TVGN_NEXT, hItem);			count++;		}		if (hItem == 0) error (SWT.ERROR_INVALID_RANGE);	}	parent.createItem (this, hParent, hItem);}static TreeItem checkNull (TreeItem item) {	if (item == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	return item;}void _setText (String string) {	int hwnd = parent.handle;	int hHeap = OS.GetProcessHeap ();	TCHAR buffer = new TCHAR (parent.getCodePage (), string, true);	int byteCount = buffer.length () * TCHAR.sizeof;	int pszText = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);	OS.MoveMemory (pszText, buffer, byteCount); 	TVITEM tvItem = new TVITEM ();	tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_TEXT;	tvItem.hItem = handle;	tvItem.pszText = pszText;	OS.SendMessage (hwnd, OS.TVM_SETITEM, 0, tvItem);	OS.HeapFree (hHeap, 0, pszText);}protected void checkSubclass () {	if (!isValidSubclass ()) error (SWT.ERROR_INVALID_SUBCLASS);}/** * Returns the receiver's background color. * * @return the background color *  * @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 2.0 *  */public Color getBackground () {	checkWidget ();	int pixel = (background == -1) ? parent.getBackgroundPixel() : background;	return Color.win32_new (display, pixel);}/** * Returns a rectangle describing the receiver's size and location * relative to its parent. * * @return the receiver's bounding rectangle * * @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 Rectangle getBounds () {	checkWidget ();	int hwnd = parent.handle;	RECT rect = new RECT ();	rect.left = handle;	if (OS.SendMessage (hwnd, OS.TVM_GETITEMRECT, 1, rect) == 0) {		return new Rectangle (0, 0, 0, 0);	}	int width = rect.right - rect.left;	int height = rect.bottom - rect.top;	return new Rectangle (rect.left, rect.top, width, height);}/** * Returns <code>true</code> if the receiver is checked, * and false otherwise.  When the parent does not have * the <code>CHECK style, return false. * <p> * * @return the checked 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> */public boolean getChecked () {	checkWidget ();	if ((parent.style & SWT.CHECK) == 0) return false;	int hwnd = parent.handle;	TVITEM tvItem = new TVITEM ();	tvItem.mask = OS.TVIF_HANDLE | OS.TVIF_STATE;	tvItem.stateMask = OS.TVIS_STATEIMAGEMASK;	tvItem.hItem = handle;	int result = OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);	return (result != 0) && (((tvItem.state >> 12) & 1) == 0);}/** * Returns <code>true</code> if the receiver is expanded, * and false otherwise. * <p> * * @return the expanded 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> */public boolean getExpanded () {	checkWidget ();	int hwnd = parent.handle;	TVITEM tvItem = new TVITEM ();	tvItem.hItem = handle;	tvItem.mask = OS.TVIF_STATE;	OS.SendMessage (hwnd, OS.TVM_GETITEM, 0, tvItem);	return (tvItem.state & OS.TVIS_EXPANDED) != 0;}/** * Returns the font that the receiver will use to paint textual information for this item. * * @return the receiver's font * * @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 Font getFont () {	checkWidget ();	return (font == -1) ? parent.getFont () : Font.win32_new (display, font);}/** * Returns the foreground color that the receiver will use to draw. * * @return the receiver's foreground color * * @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 2.0 *  */public Color getForeground () {	checkWidget ();	int pixel = (foreground == -1) ? parent.getForegroundPixel() : foreground;	return Color.win32_new (display, pixel);}/** * Returns <code>true</code> if the receiver is grayed, * and false otherwise. When the parent does not have * the <code>CHECK style, return false. * <p> * * @return the grayed 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>

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一区二区三区四区激情| 久久国产日韩欧美精品| 欧美一级理论性理论a| 国产·精品毛片| 午夜久久久久久久久| 国产精品午夜在线观看| 欧美一区二区在线观看| 91美女精品福利| 国产精品88av| 免费在线看成人av| 亚洲欧美精品午睡沙发| 2020国产精品| 日韩欧美一区中文| 欧美精品视频www在线观看| 99久久er热在这里只有精品15 | 午夜视频久久久久久| 国产精品污网站| 久久先锋影音av鲁色资源网| 欧美精品v国产精品v日韩精品 | av高清久久久| 国产精品一区二区男女羞羞无遮挡 | 欧美一区二区国产| 欧美蜜桃一区二区三区| 色综合天天综合狠狠| 国产69精品久久777的优势| 久久av中文字幕片| 日本一道高清亚洲日美韩| 亚洲综合免费观看高清完整版在线 | 日本不卡一二三区黄网| 亚洲国产日韩a在线播放 | 久久精品99久久久| 午夜电影一区二区三区| 亚洲午夜久久久久久久久电影院 | 国产精品久久久久久久蜜臀| 久久久久久久久久久久久久久99| 日韩美一区二区三区| 欧美一级欧美三级| 日韩精品一区在线观看| 日韩视频中午一区| 欧美成人精品1314www| 2023国产精华国产精品| 国产日本欧洲亚洲| 国产精品网友自拍| 中文字幕综合网| 亚洲视频在线一区观看| 亚洲黄色小视频| 亚洲国产精品久久不卡毛片| 亚洲午夜精品17c| 香蕉久久夜色精品国产使用方法| 亚洲成人精品一区二区| 天堂在线一区二区| 免费看精品久久片| 国产一区二区女| 成人av在线影院| 在线看国产一区| 91精品国产色综合久久ai换脸 | 久久国产剧场电影| 国产一区二区三区最好精华液| 国产麻豆视频一区| av不卡在线观看| 欧美主播一区二区三区美女| 欧美日韩视频在线第一区| 日韩欧美国产麻豆| 国产欧美日韩精品a在线观看| 日韩一区在线看| 亚洲国产精品久久人人爱| 美日韩一区二区| 国产成人免费在线| 91国偷自产一区二区三区观看| 欧美三级三级三级爽爽爽| 91精品国产品国语在线不卡| 2019国产精品| 亚洲人成小说网站色在线| 图片区小说区区亚洲影院| 国精品**一区二区三区在线蜜桃| 成年人国产精品| 这里只有精品免费| 国产天堂亚洲国产碰碰| 亚洲一级在线观看| 九九九精品视频| 91丨九色丨黑人外教| 欧美一级艳片视频免费观看| 国产精品狼人久久影院观看方式| 亚洲小少妇裸体bbw| 国产a视频精品免费观看| 欧美日韩国产在线观看| 中文字幕精品一区| 日韩va欧美va亚洲va久久| eeuss鲁片一区二区三区在线看| 欧美色区777第一页| 久久综合九色综合97婷婷女人| 亚洲激情校园春色| 国产精品一区专区| 欧美精品精品一区| 亚洲人成伊人成综合网小说| 激情深爱一区二区| 欧美日韩高清一区二区三区| 日本一区二区不卡视频| 日韩黄色小视频| 91麻豆精品秘密| 久久久亚洲精华液精华液精华液| 亚洲高清不卡在线| 成人激情综合网站| 精品日韩99亚洲| 石原莉奈在线亚洲二区| 一本久久a久久免费精品不卡| 精品国产青草久久久久福利| 亚洲成av人片在线| 91丨porny丨首页| 久久精品免视看| 美女一区二区在线观看| 欧美系列亚洲系列| 亚洲欧洲日产国码二区| 国产精品一区专区| 精品91自产拍在线观看一区| 天堂成人免费av电影一区| 在线视频欧美精品| 中文字幕一区二区三区在线播放| 经典三级视频一区| 日韩欧美中文字幕精品| 日韩高清一区在线| 欧美婷婷六月丁香综合色| 亚洲色图另类专区| 91在线高清观看| 国产精品国产三级国产三级人妇| 国产精品正在播放| 久久久一区二区三区| 国产一区在线视频| 久久美女高清视频| 国产成人在线观看| 国产婷婷色一区二区三区| 国产另类ts人妖一区二区| 精品国产成人在线影院| 极品尤物av久久免费看| 久久免费看少妇高潮| 国内精品自线一区二区三区视频| 欧美一级黄色大片| 激情亚洲综合在线| 久久久久久久久97黄色工厂| 国产老女人精品毛片久久| 国产亚洲成aⅴ人片在线观看| 国产在线精品免费| 国产欧美精品一区aⅴ影院| 成人午夜电影久久影院| 亚洲日穴在线视频| 欧美唯美清纯偷拍| 免费看日韩a级影片| 26uuu国产在线精品一区二区| 国内精品久久久久影院色| 国产欧美一区视频| 91蜜桃视频在线| 亚洲成人免费影院| 精品日韩欧美在线| 高清av一区二区| 一区二区三区欧美在线观看| 欧美色视频在线| 日产国产高清一区二区三区| 欧美精品一区二区三区蜜臀| 国产mv日韩mv欧美| 亚洲欧美激情小说另类| 4438亚洲最大| 国产乱理伦片在线观看夜一区| 国产精品亲子伦对白| 欧美在线高清视频| 青娱乐精品在线视频| 久久精品在线观看| 91九色最新地址| 免费看黄色91| 中文字幕 久热精品 视频在线| 91在线观看成人| 日本不卡中文字幕| 亚洲国产成人午夜在线一区| 色噜噜夜夜夜综合网| 日本特黄久久久高潮| 国产欧美视频一区二区三区| 在线观看日韩电影| 激情另类小说区图片区视频区| 国产精品久久久久久久久晋中 | 国产欧美一区二区三区在线老狼| 91视频观看视频| 久久99国产精品久久| 亚洲视频在线一区二区| 精品少妇一区二区三区 | 91视视频在线观看入口直接观看www | 亚洲同性同志一二三专区| 欧美高清性hdvideosex| 福利一区在线观看| 午夜亚洲福利老司机| 久久精品视频一区二区| 欧美日韩一级黄| 成人午夜免费电影| 免费观看在线色综合| 一区二区视频在线看| 久久婷婷国产综合精品青草 | 色悠久久久久综合欧美99| 九九精品一区二区| 亚洲国产精品嫩草影院| 中文字幕中文乱码欧美一区二区| 日韩欧美视频在线| 欧美主播一区二区三区美女|