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

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

?? fileviewer.java

?? 利用SWT作為開發(fā)用戶界面
?? JAVA
?? 第 1 頁 / 共 4 頁
字號:
		 */		Vector /* of File */ path = new Vector();		// Build a stack of paths from the root of the tree		while (dir != null) {			path.add(dir);			dir = dir.getParentFile();		}		// Recursively expand the tree to get to the specified directory		TreeItem[] items = tree.getItems();		TreeItem lastItem = null;		for (int i = path.size() - 1; i >= 0; --i) {			final File pathElement = (File) path.elementAt(i);			// Search for a particular File in the array of tree items			// No guarantee that the items are sorted in any recognizable fashion, so we'll			// just sequential scan.  There shouldn't be more than a few thousand entries.			TreeItem item = null;			for (int k = 0; k < items.length; ++k) {				item = items[k];				if (item.isDisposed()) continue;				final File itemFile = (File) item.getData(TREEITEMDATA_FILE);				if (itemFile != null && itemFile.equals(pathElement)) break;			}			if (item == null) break;			lastItem = item;			if (i != 0 && !item.getExpanded()) {				treeExpandItem(item);				item.setExpanded(true);			}			items = item.getItems();		}		tree.setSelection((lastItem != null) ? new TreeItem[] { lastItem } : new TreeItem[0]);	}		/**	 * Notifies the application components that files have been selected	 * 	 * @param files the files that were selected, null or empty array indicates no active selection	 */	void notifySelectedFiles(File[] files) {		/* Details:		 * Update the details that are visible on screen.		 */		if ((files != null) && (files.length != 0)) {			numObjectsLabel.setText(getResourceString("details.NumberOfSelectedFiles.text",				new Object[] { new Integer(files.length) }));			long fileSize = 0L;			for (int i = 0; i < files.length; ++i) {				fileSize += files[i].length();			}			diskSpaceLabel.setText(getResourceString("details.FileSize.text",				new Object[] { new Long(fileSize) }));		} else {			// No files selected			diskSpaceLabel.setText("");			if (currentDirectory != null) {				int numObjects = getDirectoryList(currentDirectory).length;				numObjectsLabel.setText(getResourceString("details.DirNumberOfObjects.text",					new Object[] { new Integer(numObjects) }));			} else {				numObjectsLabel.setText("");			}		}	}	/**	 * Notifies the application components that files must be refreshed	 * 	 * @param files the files that need refreshing, empty array is a no-op, null refreshes all	 */	void notifyRefreshFiles(File[] files) {		if (files != null && files.length == 0) return;		if ((deferredRefreshRequested) && (deferredRefreshFiles != null) && (files != null)) {			// merge requests			File[] newRequest = new File[deferredRefreshFiles.length + files.length];			System.arraycopy(deferredRefreshFiles, 0, newRequest, 0, deferredRefreshFiles.length);			System.arraycopy(files, 0, newRequest, deferredRefreshFiles.length, files.length);			deferredRefreshFiles = newRequest;		} else {			deferredRefreshFiles = files;			deferredRefreshRequested = true;		}		handleDeferredRefresh();	}	/**	 * Handles deferred Refresh notifications (due to Drag & Drop)	 */	void handleDeferredRefresh() {		if (isDragging || isDropping || ! deferredRefreshRequested) return;		if (progressDialog != null) {			progressDialog.close();			progressDialog = null;		}		deferredRefreshRequested = false;		File[] files = deferredRefreshFiles;		deferredRefreshFiles = null;		shell.setCursor(iconCache.stockCursors[iconCache.cursorWait]);		/* Table view:		 * Refreshes information about any files in the list and their children.		 */		boolean refreshTable = false;		if (files != null) {			for (int i = 0; i < files.length; ++i) {				final File file = files[i];				if (file.equals(currentDirectory)) {					refreshTable = true;					break;				}				File parentFile = file.getParentFile();				if ((parentFile != null) && (parentFile.equals(currentDirectory))) {					refreshTable = true;					break;				}			}		} else refreshTable = true;		if (refreshTable) workerUpdate(currentDirectory, true);		/* Combo view:		 * Refreshes the list of roots		 */		final File[] roots = getRoots();		if (files == null) {			boolean refreshCombo = false;			final File[] comboRoots = (File[]) combo.getData(COMBODATA_ROOTS);					if ((comboRoots != null) && (comboRoots.length == roots.length)) {				for (int i = 0; i < roots.length; ++i) {					if (! roots[i].equals(comboRoots[i])) {						refreshCombo = true;						break;					}				}			} else refreshCombo = true;			if (refreshCombo) {				combo.removeAll();				combo.setData(COMBODATA_ROOTS, roots);				for (int i = 0; i < roots.length; ++i) {					final File file = roots[i];					combo.add(file.getPath());				}			}		}		/* Tree view:		 * Refreshes information about any files in the list and their children.		 */		treeRefresh(roots);				// Remind everyone where we are in the filesystem		final File dir = currentDirectory;		currentDirectory = null;		notifySelectedDirectory(dir);		shell.setCursor(iconCache.stockCursors[iconCache.cursorDefault]);	}	/**	 * Performs the default action on a set of files.	 * 	 * @param files the array of files to process	 */	void doDefaultFileAction(File[] files) {		// only uses the 1st file (for now)		if (files.length == 0) return;		final File file = files[0];		if (file.isDirectory()) {			notifySelectedDirectory(file);		} else {			final String fileName = file.getAbsolutePath();			if (! Program.launch(fileName)) {					MessageBox dialog = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK);				dialog.setMessage(getResourceString("error.FailedLaunch.message", new Object[] { fileName }));				dialog.setText(shell.getText ());				dialog.open();			}		}	}	/**	 * Navigates to the parent directory	 */	void doParent() {		if (currentDirectory == null) return;		File parentDirectory = currentDirectory.getParentFile();		notifySelectedDirectory(parentDirectory);	}	 	/**	 * Performs a refresh	 */	void doRefresh() {		notifyRefreshFiles(null);	}	/**	 * Validates a drop target as a candidate for a drop operation.	 * <p>	 * Used in dragOver() and dropAccept().<br>	 * Note event.detail is set to DND.DROP_NONE by this method if the target is not valid.	 * </p>	 * @param event the DropTargetEvent to validate	 * @param targetFile the File representing the drop target location	 *        under inspection, or null if none	 */	private boolean dropTargetValidate(DropTargetEvent event, File targetFile) {		if (targetFile != null && targetFile.isDirectory()) {			if (event.detail != DND.DROP_COPY && event.detail != DND.DROP_MOVE) {				event.detail = DND.DROP_MOVE;			}		} else {			event.detail = DND.DROP_NONE;		}		return event.detail != DND.DROP_NONE;	}	/**	 * Handles a drop on a dropTarget.	 * <p>	 * Used in drop().<br>	 * Note event.detail is modified by this method.	 * </p>	 * @param event the DropTargetEvent passed as parameter to the drop() method	 * @param targetFile the File representing the drop target location	 *        under inspection, or null if none	 */	private void dropTargetHandleDrop(DropTargetEvent event, File targetFile) {		// Get dropped data (an array of filenames)		if (! dropTargetValidate(event, targetFile)) return;		final String[] sourceNames = (String[]) event.data;		if (sourceNames == null) event.detail = DND.DROP_NONE;		if (event.detail == DND.DROP_NONE) return;		// Open progress dialog		progressDialog = new ProgressDialog(shell,			(event.detail == DND.DROP_MOVE) ? ProgressDialog.MOVE : ProgressDialog.COPY);		progressDialog.setTotalWorkUnits(sourceNames.length);		progressDialog.open();		// Copy each file		Vector /* of File */ processedFiles = new Vector();		for (int i = 0; (i < sourceNames.length) && (! progressDialog.isCancelled()); i++){			final File source = new File(sourceNames[i]);			final File dest = new File(targetFile, source.getName());			if (source.equals(dest)) continue; // ignore if in same location			progressDialog.setDetailFile(source, ProgressDialog.COPY);			while (! progressDialog.isCancelled()) {				if (copyFileStructure(source, dest)) {					processedFiles.add(source);					break;				} else if (! progressDialog.isCancelled()) {					if (event.detail == DND.DROP_MOVE && (!isDragging)) {						// It is not possible to notify an external drag source that a drop						// operation was only partially successful.  This is particularly a						// problem for DROP_MOVE operations since unless the source gets						// DROP_NONE, it will delete the original data including bits that						// may not have been transferred successfully.						MessageBox box = new MessageBox(shell, SWT.ICON_ERROR | SWT.RETRY | SWT.CANCEL);						box.setText(getResourceString("dialog.FailedCopy.title"));						box.setMessage(getResourceString("dialog.FailedCopy.description",							new Object[] { source, dest }));						int button = box.open();						if (button == SWT.CANCEL) {							i = sourceNames.length;							event.detail = DND.DROP_NONE;							break;						}					} else {						// We can recover gracefully from errors if the drag source belongs						// to this application since it will look at processedDropFiles.						MessageBox box = new MessageBox(shell, SWT.ICON_ERROR | SWT.ABORT | SWT.RETRY | SWT.IGNORE);						box.setText(getResourceString("dialog.FailedCopy.title"));						box.setMessage(getResourceString("dialog.FailedCopy.description",							new Object[] { source, dest }));						int button = box.open();						if (button == SWT.ABORT) i = sourceNames.length;						if (button != SWT.RETRY) break;					}				}				progressDialog.addProgress(1);			}		}		if (isDragging) {			// Remember exactly which files we processed			processedDropFiles = ((File[]) processedFiles.toArray(new File[processedFiles.size()]));		} else {			progressDialog.close();			progressDialog = null;		}		notifyRefreshFiles(new File[] { targetFile });	}	/**	 * Handles the completion of a drag on a dragSource.	 * <p>	 * Used in dragFinished().<br>	 * </p>	 * @param event the DragSourceEvent passed as parameter to the dragFinished() method	 * @param sourceNames the names of the files that were dragged (event.data is invalid)	 */	private void dragSourceHandleDragFinished(DragSourceEvent event, String[] sourceNames) {		if (sourceNames == null) return;		if (event.detail != DND.DROP_MOVE) return;		// Get array of files that were actually transferred		final File[] sourceFiles;		if (processedDropFiles != null) {			sourceFiles = processedDropFiles;		} else {			sourceFiles = new File[sourceNames.length];			for (int i = 0; i < sourceNames.length; ++i)				sourceFiles[i] = new File(sourceNames[i]);		}			if (progressDialog == null)			progressDialog = new ProgressDialog(shell, ProgressDialog.MOVE);		progressDialog.setTotalWorkUnits(sourceFiles.length);		progressDialog.setProgress(0);		progressDialog.open();		// Delete each file		for (int i = 0; (i < sourceFiles.length) && (! progressDialog.isCancelled()); i++){			final File source = sourceFiles[i];			progressDialog.setDetailFile(source, ProgressDialog.DELETE);			while (! progressDialog.isCancelled()) {				if (deleteFileStructure(source)) {					break;				} else if (! progressDialog.isCancelled()) {					MessageBox box = new MessageBox(shell, SWT.ICON_ERROR | SWT.ABORT | SWT.RETRY | SWT.IGNORE);					box.setText(getResourceString("dialog.FailedDelete.title"));					box.setMessage(getResourceString("dialog.FailedDelete.description",						new Object[] { source }));					int button = box.open();					if (button == SWT.ABORT) i = sourceNames.length;					if (button == SWT.RETRY) break;				}			}			progressDialog.addProgress(1);		}		notifyRefreshFiles(sourceFiles);		progressDialog.close();		progressDialog = null;	}	/**	 * Gets filesystem root entries	 * 	 * @return an array of Files corresponding to the root directories on the platform,	 *         may be empty but not null	 */	File[] getRoots() {		/*		 * On JDK 1.22 only...		 */		// return File.listRoots();		/*		 * On JDK 1.1.7 and beyond...		 * -- PORTABILITY ISSUES HERE --		 */		if (System.getProperty ("os.name").indexOf ("Windows") != -1) {			Vector /* of File */ list = new Vector();			list.add(new File(DRIVE_A));			list.add(new File(DRIVE_B));			for (char i = 'c'; i <= 'z'; ++i) {				File drive = new File(i + ":" + File.separator);				if (drive.isDirectory() && drive.exists()) {					list.add(drive);					if (initial && i == 'c') {						currentDirectory = drive;						initial = false;					}				}			}			File[] roots = (File[]) list.toArray(new File[list.size()]);			sortFiles(roots);			return roots;		} else {			File root = new File(File.separator);			if (initial) {				currentDirectory = root;			}			return new File[] { root };		}	}	/**	 * Gets a directory listing	 * 	 * @param file the directory to be listed	 * @return an array of files this directory contains, may be empty but not null	 */	static File[] getDirectoryList(File file) {		File[] list = file.listFiles();		if (list == null) return new File[0];		sortFiles(list);		return list;	}		/**	 * Copies a file or entire directory structure.	 * 	 * @param oldFile the location of the old file or directory	 * @param newFile the location of the new file or directory	 * @return true iff the operation succeeds without errors	 */	boolean copyFileStructure(File oldFile, File newFile) {		if (oldFile == null || newFile == null) return false;				// ensure that newFile is not a child of oldFile or a dupe		File searchFile = newFile;		do {			if (oldFile.equals(searchFile)) return false;			searchFile = searchFile.getParentFile();		} while (searchFile != null);				if (oldFile.isDirectory()) {			/*			 * Copy a directory			 */			if (progressDialog != null) {				progressDialog.setDetailFile(oldFile, ProgressDialog.COPY);			}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99久久99久久精品免费看蜜桃 | 亚洲成av人影院在线观看网| 久久久www成人免费无遮挡大片| 欧美日韩午夜精品| 在线免费观看不卡av| 大胆欧美人体老妇| 丰满放荡岳乱妇91ww| 国产不卡视频一区二区三区| 国产经典欧美精品| 国产精品一区久久久久| 国产米奇在线777精品观看| 国产一区二区不卡老阿姨| 精品伊人久久久久7777人| 久久精工是国产品牌吗| 久久99精品国产麻豆婷婷洗澡| 免费成人在线网站| 九一九一国产精品| 国产精品一二二区| 成人免费高清视频在线观看| 成人av资源网站| 一本色道a无线码一区v| 欧美性xxxxx极品少妇| 欧美顶级少妇做爰| 欧美va天堂va视频va在线| 精品国产91洋老外米糕| 日本一区二区三区高清不卡| 18成人在线视频| 亚洲午夜在线电影| 青青草国产成人av片免费| 精品一区二区在线观看| 成人av电影在线播放| 91激情在线视频| 91精品国产丝袜白色高跟鞋| 精品免费日韩av| 欧美国产一区二区| 曰韩精品一区二区| 美国十次了思思久久精品导航| 国产一区二区三区国产| 91视频www| 欧美顶级少妇做爰| 国产精品网站在线播放| 一区二区三区四区亚洲| 美女国产一区二区三区| 粉嫩高潮美女一区二区三区| 日韩一区日韩二区| 日本不卡免费在线视频| 国产白丝精品91爽爽久久| 在线精品国精品国产尤物884a| 91精品国产综合久久婷婷香蕉 | 肉色丝袜一区二区| 国产真实精品久久二三区| 一本在线高清不卡dvd| 欧美人与性动xxxx| 欧美激情一区二区在线| 午夜久久久影院| 国产91在线看| 欧美一区二区三区的| 国产精品色婷婷久久58| 五月婷婷久久丁香| 国产a区久久久| 欧美精品久久99久久在免费线 | 欧美人妖巨大在线| 国产日本亚洲高清| 天堂一区二区在线| 99久久精品免费看国产免费软件| 欧美猛男超大videosgay| 国产情人综合久久777777| 日本亚洲免费观看| 色先锋aa成人| 国产女人水真多18毛片18精品视频| 亚洲国产综合人成综合网站| 从欧美一区二区三区| 日韩一卡二卡三卡国产欧美| 亚洲人成网站在线| 国产精品1024久久| 日韩欧美成人激情| 亚洲国产精品一区二区www| 成人av在线一区二区| 精品动漫一区二区三区在线观看| 亚洲五码中文字幕| 91麻豆国产自产在线观看| 久久久久久久久久电影| 日韩成人一级片| 91国产免费看| 亚洲欧洲国产专区| 成人午夜在线视频| 久久亚洲私人国产精品va媚药| 日本在线观看不卡视频| 欧美日韩精品一区二区三区四区| 亚洲色图欧美激情| 成人精品高清在线| 国产色产综合产在线视频| 免费看日韩a级影片| 欧美夫妻性生活| 天堂成人免费av电影一区| 欧洲日韩一区二区三区| 亚洲日本乱码在线观看| 成人激情视频网站| 欧美激情一区二区三区四区| 国产精品一品视频| 精品国免费一区二区三区| 天堂午夜影视日韩欧美一区二区| 欧美日韩一区国产| 首页国产欧美久久| 欧美日韩另类一区| 亚洲1区2区3区4区| 在线成人免费视频| 日本三级亚洲精品| 日韩欧美一二三| 激情综合网最新| 国产亚洲一区二区三区在线观看| 国内成人精品2018免费看| 久久人人爽人人爽| 成人免费高清视频在线观看| 亚洲欧美综合网| 一本大道av伊人久久综合| 亚洲精品成a人| 欧美日韩在线播| 日韩电影在线观看网站| 日韩一区二区精品葵司在线| 九九国产精品视频| 国产欧美综合色| 91蝌蚪porny| 亚洲444eee在线观看| 精品日韩欧美一区二区| 国产福利精品一区二区| 国产精品黄色在线观看| 91黄色免费观看| 蜜桃久久精品一区二区| 久久这里只精品最新地址| 成人午夜激情在线| 亚洲国产精品一区二区久久 | 欧美国产视频在线| 色综合久久久久久久| 婷婷综合另类小说色区| 亚洲精品一区二区三区四区高清| 国产伦精品一区二区三区免费迷 | 欧美国产精品劲爆| 91小宝寻花一区二区三区| 亚洲国产成人91porn| 日韩美女主播在线视频一区二区三区| 韩国av一区二区三区在线观看| 欧美国产丝袜视频| 欧美剧情片在线观看| 国产精品白丝av| 亚洲特黄一级片| 日韩欧美国产一二三区| 懂色av一区二区三区免费看| 午夜影视日本亚洲欧洲精品| 欧美成人精品福利| 99re成人精品视频| 秋霞电影一区二区| 最新日韩av在线| 日韩欧美中文字幕公布| 不卡一区在线观看| 日韩av电影一区| 亚洲人成7777| 精品久久国产老人久久综合| 97精品电影院| 黄网站免费久久| 亚洲最大色网站| 久久久三级国产网站| 欧美午夜理伦三级在线观看| 黄色日韩网站视频| 亚洲高清在线视频| 国产精品国产自产拍高清av| 91精品免费在线| 99re在线视频这里只有精品| 精品一区二区影视| 亚洲成人在线免费| 中文字幕一区视频| 精品盗摄一区二区三区| 欧美人妇做爰xxxⅹ性高电影| 成人免费毛片片v| 麻豆久久久久久| 亚洲专区一二三| 国产精品国产三级国产普通话三级| 日韩欧美成人一区| 欧美日韩国产综合视频在线观看| www.欧美日韩国产在线| 国内外精品视频| 日韩电影一二三区| 亚洲午夜激情av| 亚洲欧美aⅴ...| 中文字幕在线观看一区| 久久久美女艺术照精彩视频福利播放| 欧美日韩精品一区二区三区四区| 91丨九色丨蝌蚪富婆spa| 风间由美一区二区三区在线观看| 久久99精品久久久久久国产越南 | 美女在线视频一区| 五月天欧美精品| 亚洲国产成人av网| 一区二区三区四区乱视频| 国产精品污www在线观看| 久久精品一区二区| 久久只精品国产| 2020国产精品久久精品美国| 日韩一区二区三区观看| 这里是久久伊人|