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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? program.java

?? 源碼為Eclipse開(kāi)源開(kāi)發(fā)平臺(tái)桌面開(kāi)發(fā)工具SWT的源代碼,
?? JAVA
字號(hào):
/******************************************************************************* * 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.program; import org.eclipse.swt.internal.*;import org.eclipse.swt.internal.win32.*;import org.eclipse.swt.*;import org.eclipse.swt.graphics.*;import java.io.IOException;/** * Instances of this class represent programs and * their assoicated file extensions in the operating * system. */public final class Program {	String name;	String command;	String iconName;/** * Prevents uninitialized instances from being created outside the package. */Program () {}/** * Finds the program that is associated with an extension. * The extension may or may not begin with a '.'.  Note that * a <code>Display</code> must already exist to guarantee that * this method returns an appropriate result. * * @param extension the program extension * @return the program or <code>null</code> * * @exception SWTError <ul> *		<li>ERROR_NULL_ARGUMENT when extension is null</li> *	</ul> */public static Program findProgram (String extension) {	if (extension == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	if (extension.length () == 0) return null;	if (extension.charAt (0) != '.') extension = "." + extension; //$NON-NLS-1$	/* Use the character encoding for the default locale */	TCHAR key = new TCHAR (0, extension, true);	int [] phkResult = new int [1];	if (OS.RegOpenKeyEx (OS.HKEY_CLASSES_ROOT, key, 0, OS.KEY_READ, phkResult) != 0) {		return null;	}		int [] lpcbData = new int [] {256};	TCHAR lpData = new TCHAR (0, lpcbData [0]);	int result = OS.RegQueryValueEx (phkResult [0], null, 0, null, lpData, lpcbData);	OS.RegCloseKey (phkResult [0]);	if (result != 0) return null;	return getProgram (lpData.toString (0, lpData.strlen ()));}/** * Answer all program extensions in the operating system.  Note * that a <code>Display</code> must already exist to guarantee * that this method returns an appropriate result. * * @return an array of extensions */public static String [] getExtensions () {	String [] extensions = new String [1024];	/* Use the character encoding for the default locale */	TCHAR lpName = new TCHAR (0, 1024);	int [] lpcName = new int [] {lpName.length ()};	FILETIME ft = new FILETIME ();	int dwIndex = 0, count = 0;	while (OS.RegEnumKeyEx (OS.HKEY_CLASSES_ROOT, dwIndex, lpName, lpcName, null, null, null, ft) != OS.ERROR_NO_MORE_ITEMS) {		String extension = lpName.toString (0, lpcName [0]);		lpcName [0] = lpName.length ();		if (extension.length () > 0 && extension.charAt (0) == '.') {			if (count == extensions.length) {				String [] newExtensions = new String [extensions.length + 1024];				System.arraycopy (extensions, 0, newExtensions, 0, extensions.length);				extensions = newExtensions;			}			extensions [count++] = extension;		}		dwIndex++;	}	if (count != extensions.length) {		String [] newExtension = new String [count];		System.arraycopy (extensions, 0, newExtension, 0, count);		extensions = newExtension;	}	return extensions;}static String getKeyValue (String string, boolean expand) {	/* Use the character encoding for the default locale */	TCHAR key = new TCHAR (0, string, true);	int [] phkResult = new int [1];	if (OS.RegOpenKeyEx (OS.HKEY_CLASSES_ROOT, key, 0, OS.KEY_READ, phkResult) != 0) {		return null;	}	String result = null;	int [] lpcbData = new int [1];	if (OS.RegQueryValueEx (phkResult [0], (TCHAR) null, 0, null, null, lpcbData) == 0) {		result = "";		int length = lpcbData [0] / TCHAR.sizeof;		if (length != 0) {			/* Use the character encoding for the default locale */			TCHAR lpData = new TCHAR (0, length);			if (OS.RegQueryValueEx (phkResult [0], null, 0, null, lpData, lpcbData) == 0) {				if (!OS.IsWinCE && expand) {					length = OS.ExpandEnvironmentStrings (lpData, null, 0);					if (length != 0) {						TCHAR lpDst = new TCHAR (0, length);						OS.ExpandEnvironmentStrings (lpData, lpDst, length);						result = lpDst.toString (0, Math.max (0, length - 1));					}				} else {					length = Math.max (0, lpData.length () - 1);					result = lpData.toString (0, length);				}			}		}	}	if (phkResult [0] != 0) OS.RegCloseKey (phkResult [0]);	return result;}static Program getProgram (String key) {	/* Name */	String name = getKeyValue (key, false);	if (name == null || name.length () == 0) return null;	/* Command */	String DEFAULT_COMMAND = "\\shell"; //$NON-NLS-1$	String defaultCommand = getKeyValue (key + DEFAULT_COMMAND, true);	if (defaultCommand == null) defaultCommand = "open"; //$NON-NLS-1$	String COMMAND = "\\shell\\" + defaultCommand + "\\command"; //$NON-NLS-1$	String command = getKeyValue (key + COMMAND, true);	if (command == null || command.length () == 0) return null;	/* Icon */	String DEFAULT_ICON = "\\DefaultIcon"; //$NON-NLS-1$	String iconName = getKeyValue (key + DEFAULT_ICON, true);	if (iconName == null || iconName.length () == 0) return null;	Program program = new Program ();	program.name = name;	program.command = command;	program.iconName = iconName;	return program;}/** * Answers all available programs in the operating system.  Note * that a <code>Display</code> must already exist to guarantee * that this method returns an appropriate result. * * @return an array of programs */public static Program [] getPrograms () {	Program [] programs = new Program [1024];	/* Use the character encoding for the default locale */	TCHAR lpName = new TCHAR (0, 1024);	int [] lpcName = new int [] {lpName.length ()};	FILETIME ft = new FILETIME ();	int dwIndex = 0, count = 0;	while (OS.RegEnumKeyEx (OS.HKEY_CLASSES_ROOT, dwIndex, lpName, lpcName, null, null, null, ft) != OS.ERROR_NO_MORE_ITEMS) {			String path = lpName.toString (0, lpcName [0]);		lpcName [0] = lpName.length ();		Program program = getProgram (path);		if (program != null) {			if (count == programs.length) {				Program [] newPrograms = new Program [programs.length + 1024];				System.arraycopy (programs, 0, newPrograms, 0, programs.length);				programs = newPrograms;			}			programs [count++] = program;		}		dwIndex++;	}	if (count != programs.length) {		Program [] newPrograms = new Program [count];		System.arraycopy (programs, 0, newPrograms, 0, count);		programs = newPrograms;	}	return programs;}/** * Launches the executable associated with the file in * the operating system.  If the file is an executable, * then the executable is launched.  Note that a <code>Display</code> * must already exist to guarantee that this method returns * an appropriate result. * * @param fileName the file or program name * @return <code>true</code> if the file is launched, otherwise <code>false</code> *  * @exception SWTError <ul> *		<li>ERROR_NULL_ARGUMENT when fileName is null</li> *	</ul> */public static boolean launch (String fileName) {	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);		/* Use the character encoding for the default locale */	int hHeap = OS.GetProcessHeap ();	TCHAR buffer = new TCHAR (0, fileName, true);	int byteCount = buffer.length () * TCHAR.sizeof;	int lpFile = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, byteCount);	OS.MoveMemory (lpFile, buffer, byteCount);		SHELLEXECUTEINFO info = new SHELLEXECUTEINFO ();	info.cbSize = SHELLEXECUTEINFO.sizeof;	info.lpFile = lpFile;	info.nShow = OS.SW_SHOW;		boolean result = OS.ShellExecuteEx (info);			if (lpFile != 0) OS.HeapFree (hHeap, 0, lpFile);		return result;}/** * Executes the program with the file as the single argument * in the operating system.  It is the responsibility of the * programmer to ensure that the file contains valid data for  * this program. * * @param fileName the file or program name * @return <code>true</code> if the file is launched, otherwise <code>false</code> *  * @exception SWTError <ul> *		<li>ERROR_NULL_ARGUMENT when fileName is null</li> *	</ul> */public boolean execute (String fileName) {	if (fileName == null) SWT.error (SWT.ERROR_NULL_ARGUMENT);	boolean quote = true;	String prefix = command, suffix = ""; //$NON-NLS-1$	int index = command.indexOf ("%1"); //$NON-NLS-1$	if (index != -1) {		int count=0;		int i=index + 2, length = command.length ();		while (i < length) {			if (command.charAt (i) == '"') count++;			i++;		}		quote = count % 2 == 0;		prefix = command.substring (0, index);		suffix = command.substring (index + 2, length);	}	if (quote) fileName = " \"" + fileName + "\""; //$NON-NLS-1$ //$NON-NLS-2$	try {		Compatibility.exec(prefix + fileName + suffix);	} catch (IOException e) {		return false;	}	return true;}/** * Returns the receiver's image data.  This is the icon * that is associated with the reciever in the operating * system. * * @return the image data for the program, may be null */public ImageData getImageData () {	int nIconIndex = 0;	String fileName = iconName;	int index = iconName.indexOf (',');	if (index != -1) {		fileName = iconName.substring (0, index);		String iconIndex = iconName.substring (index + 1, iconName.length ()).trim ();		try {			nIconIndex = Integer.parseInt (iconIndex);		} catch (NumberFormatException e) {}	}	/* Use the character encoding for the default locale */	TCHAR lpszFile = new TCHAR (0, fileName, true);	int [] phiconSmall = new int[1], phiconLarge = null;	OS.ExtractIconEx (lpszFile, nIconIndex, phiconLarge, phiconSmall, 1);	if (phiconSmall [0] == 0) return null;	Image image = Image.win32_new (null, SWT.ICON, phiconSmall[0]);	ImageData imageData = image.getImageData ();	image.dispose ();	return imageData;}/** * Returns the receiver's name.  This is as short and * descriptive a name as possible for the program.  If * the program has no descriptive name, this string may * be the executable name, path or empty. * * @return an the name of the program */public String getName () {	return name;}/** * Returns true if the receiver and the argument represent * the same program. *  * @return true if the programs are the same */public boolean equals(Object other) {	if (this == other) return true;	if (other instanceof Program) {		final Program program = (Program) other;		return name.equals(program.name) && command.equals(program.command)			&& iconName.equals(program.iconName);	}	return false;}/** * Returns a hash code suitable for this object. *  * @return a hash code */public int hashCode() {	return name.hashCode() ^ command.hashCode() ^ iconName.hashCode();}public String toString () {	return "Program {" + name + "}"; //$NON-NLS-1$ //$NON-NLS-2$}}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
视频在线在亚洲| 国产成人亚洲综合a∨婷婷| 久久综合狠狠综合久久综合88| 99国产精品久久久| 久久国产精品色| 亚洲一区二区中文在线| 欧美国产1区2区| 日韩你懂的在线播放| 色综合色综合色综合色综合色综合| 美女一区二区在线观看| 亚洲一区二区在线免费看| 欧美韩日一区二区三区四区| 91精品福利在线一区二区三区 | 欧美电影免费观看完整版| 色婷婷亚洲综合| 成人美女在线观看| 激情另类小说区图片区视频区| 亚洲第一主播视频| 亚洲精品日产精品乱码不卡| 国产欧美日产一区| 久久久亚洲国产美女国产盗摄| 91精品国产丝袜白色高跟鞋| 日本精品一级二级| 91视频com| 99国产欧美久久久精品| 不卡一区中文字幕| 不卡的看片网站| 成人亚洲一区二区一| 精品一二三四在线| 久久99最新地址| 热久久免费视频| 日本欧美一区二区三区乱码| 日一区二区三区| 日韩avvvv在线播放| 天堂va蜜桃一区二区三区漫画版| 亚洲成人综合网站| 亚洲国产精品麻豆| 亚洲sss视频在线视频| 亚洲亚洲人成综合网络| 一区二区在线观看视频在线观看| 亚洲欧美经典视频| 亚洲黄色片在线观看| 亚洲午夜一区二区| 日韩—二三区免费观看av| 日韩电影在线一区| 激情六月婷婷久久| 国产高清一区日本| jlzzjlzz亚洲女人18| 91色综合久久久久婷婷| 欧美亚洲精品一区| 这里是久久伊人| 欧美电影免费观看完整版| 久久久久久久久久久黄色| 国产三级精品视频| 亚洲欧美日韩在线不卡| 亚洲夂夂婷婷色拍ww47| 日韩黄色一级片| 国精品**一区二区三区在线蜜桃| 国产不卡在线播放| 91视频一区二区三区| 欧洲精品一区二区| 日韩视频一区二区三区在线播放 | 不卡一区二区三区四区| 色综合天天在线| 欧美日本不卡视频| 日韩欧美亚洲国产另类 | 久久五月婷婷丁香社区| 中文字幕中文字幕一区| 亚洲福利电影网| 精品一区二区三区久久| www.亚洲激情.com| 欧美日韩一区国产| 久久美女高清视频| 专区另类欧美日韩| 麻豆久久久久久| 成年人国产精品| 欧美高清精品3d| 国产欧美一区视频| 亚洲国产婷婷综合在线精品| 美女网站在线免费欧美精品| 国产精品一区二区三区四区| 91麻豆自制传媒国产之光| 制服丝袜激情欧洲亚洲| 国产欧美日韩在线视频| 亚洲午夜激情网页| 国产suv精品一区二区6| 欧美三级午夜理伦三级中视频| 久久人人97超碰com| 一区二区三区久久久| 国产永久精品大片wwwapp| 欧美色图天堂网| 国产日本一区二区| 石原莉奈一区二区三区在线观看| 国产美女在线精品| 欧美亚洲国产怡红院影院| 日本一区二区三区国色天香 | 国产精品国产馆在线真实露脸| 日本一不卡视频| 在线观看一区不卡| 久久久亚洲精品一区二区三区| 午夜电影网一区| 99re在线精品| 国产午夜精品一区二区三区嫩草| 亚洲1区2区3区视频| 99精品国产91久久久久久 | 国产精品剧情在线亚洲| 久久99国产乱子伦精品免费| 欧美视频精品在线| 亚洲人成影院在线观看| 粉嫩av一区二区三区在线播放| 91精品国产欧美一区二区成人| 亚洲欧美日韩在线播放| 成年人网站91| 国产精品无码永久免费888| 九九国产精品视频| 欧美一区二区三区免费| 亚洲成人自拍一区| 日本高清不卡视频| 亚洲欧洲日产国产综合网| 国产成人精品一区二区三区四区| 日韩欧美久久久| 日本不卡一二三| 69p69国产精品| 水蜜桃久久夜色精品一区的特点| 欧美探花视频资源| 亚洲一级二级三级在线免费观看| 99热在这里有精品免费| 国产精品国产精品国产专区不片| 高清不卡一区二区在线| 欧美韩国一区二区| 成人午夜免费电影| 中文字幕免费不卡| 国产99久久久国产精品免费看| 久久综合九色综合97婷婷| 极品尤物av久久免费看| 精品精品欲导航| 激情欧美一区二区三区在线观看| 亚洲精品在线电影| 国产成人综合在线| 日本一区二区成人在线| 99精品欧美一区二区三区综合在线| 国产精品进线69影院| 91在线观看污| 亚洲激情校园春色| 欧美美女黄视频| 三级影片在线观看欧美日韩一区二区| 欧美嫩在线观看| 免费一级片91| 国产三级一区二区三区| 成人黄色av网站在线| 亚洲欧美日韩国产一区二区三区| 欧亚一区二区三区| 日本成人在线网站| 久久美女高清视频| 97精品国产97久久久久久久久久久久| 一区二区三区在线看| 3d成人动漫网站| 狠狠色狠狠色综合| 中文字幕色av一区二区三区| 欧美午夜寂寞影院| 黄色日韩网站视频| 亚洲欧洲精品天堂一级| 在线看日本不卡| 激情综合网av| 中文字幕在线视频一区| 欧美日韩激情在线| 黄色日韩网站视频| 亚洲精品视频免费看| 日韩一级免费观看| 成人精品国产免费网站| 亚洲成人av电影| 久久婷婷色综合| 91激情五月电影| 精品亚洲欧美一区| 亚洲男人的天堂av| 欧美成人一区二区三区片免费| 高清不卡一区二区在线| 午夜国产精品一区| 国产精品区一区二区三| 欧美日韩高清在线| 国产盗摄视频一区二区三区| 亚洲午夜av在线| 久久久99久久| 在线不卡一区二区| av中文字幕在线不卡| 日本伊人午夜精品| 亚洲欧美激情小说另类| 精品区一区二区| 欧美日韩一区二区电影| 国产福利一区二区| 奇米影视一区二区三区| 中文字幕一区二区三区在线播放| 日韩欧美在线1卡| 色香蕉成人二区免费| 国产成人自拍高清视频在线免费播放| 亚洲一二三区在线观看| 国产精品高潮呻吟久久| xfplay精品久久| 91精品国产综合久久久蜜臀图片| 97久久超碰国产精品电影|