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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? path.java

?? ZK 基礎介紹 功能操作 模塊 結合數據庫操作
?? JAVA
字號:
/* Path.java{{IS_NOTE	Purpose:			Description:			History:		Thu Jan 19 14:07:44     2006, Created by tomyeh}}IS_NOTECopyright (C) 2006 Potix Corporation. All Rights Reserved.{{IS_RIGHT	This program is distributed under GPL Version 2.0 in the hope that	it will be useful, but WITHOUT ANY WARRANTY.}}IS_RIGHT*/package org.zkoss.zk.ui;import java.util.Collection;import org.zkoss.zk.mesg.MZk;import org.zkoss.zk.ui.sys.ComponentsCtrl;import org.zkoss.zk.ui.sys.ExecutionCtrl;/** * A representation of a component path. * * @author tomyeh */public class Path {	private final String _path;	public Path() {		this((String)null);	}	public Path(String path) {		_path = normalize(path);	}	public Path(String parent, String child) {		this(parent == null || parent.length() == 0 ? child:			child == null || child.length() == 0 ? parent:				parent + '/' + child);	}	public Path(Path parent, String child) {		this(parent != null ? parent.getPath(): null, child);	}	/** Returns the path of the specified component. */	public Path(Component comp) {		this(getPath(comp));	}	/** Returns the path (after normalized).	 */	public String getPath() {		return _path;	}	/** Returns the component with this path, or null if no such component.	 */	public Component getComponent() {		return getComponent0(null, _path);	}	/** Returns the path of the specified component.	 */	public static final String getPath(Component comp) {		final StringBuffer sb = new StringBuffer(64);		for (;;) {			if (sb.length() > 0) sb.insert(0, '/');			final String compId = comp.getId();			if (ComponentsCtrl.isAutoId(compId))				throw new UiException(MZk.AUTO_ID_NOT_ALLOWED_IN_PATH, comp);			sb.insert(0, compId);			IdSpace is = comp.getSpaceOwner();			if (is instanceof Page) break; //done			if (is == comp) {				final Component p = ((Component)is).getParent();				if (p == null) break; //topmost				is = p.getSpaceOwner();				if (is instanceof Page) break; //done			}			comp = (Component)is;		}		sb.insert(0, '/');		return sb.toString();	}	/** Returns the component of the specified path, or null if no such component.	 */	public static final Component getComponent(String path) {		return getComponent0(null, normalize(path));	}	/** Returns the component of the specified path which is related	 * to the specified ID space, or null if no such component.	 *	 * @param is the current ID space. It is required only if path is related	 * (in other words, not starting with / or //).	 */	public static final Component getComponent(IdSpace is, String path) {		return getComponent0(is, normalize(path));	}	private static final Component getComponent0(IdSpace is, String path) {		Component found = null;		for (int j = 0, k;; j = k + 1) {			k = path.indexOf('/', j);			if (k == 0) { //starts with /				final Execution exec = Executions.getCurrent();				final Desktop desktop = exec.getDesktop();				Page page = ((ExecutionCtrl)exec).getCurrentPage();				if (page == null) {					final Collection pages = desktop.getPages();					if (pages.isEmpty())						return null;					page = (Page)pages.iterator().next();						//the first page assumed				}				if (path.length() == 1) // "/" only					return getFirstRoot(page); //the first root assumed				if (path.charAt(1) == '/') { //starts with //					k = path.indexOf('/', 2);					if (k < 0)						return getFirstRoot(page); //the first root assumed					final String nm = path.substring(2, k);					is = desktop.getPageIfAny(nm);					if (is == null)						return null; //no such page				} else {					is = page;				}				continue;			}			final String nm = k >= 0 ? path.substring(j, k): path.substring(j);			if ("..".equals(nm)) {				if (!(is instanceof Component))					return null;				final Component c = (Component)is;				final Component p = c.getParent();				is = p != null ? p.getSpaceOwner(): (IdSpace)c.getPage();				if (k < 0) {					return (is instanceof Component) ? (Component)is: null;				}				continue;			}			if (is == null)				return null;			final Component c = is.getFellow(nm);			if (k < 0) return c;			if (!(c instanceof IdSpace))				return null;			is = (IdSpace)c;		}	}	private static Component getFirstRoot(Page page) {		final Collection roots = page.getRoots();		return roots.isEmpty() ? null: (Component)roots.iterator().next();	}	/**	 * Normalizes the giving path.	 * It removes consecutive slahses, ending slahes,	 * redudant . and ..	 */	private static final String normalize(String path) {		if (path == null)			return "";		//remove consecutive slashes		final StringBuffer sb = new StringBuffer(path);		boolean slash = false;		for (int j = 0, len = sb.length(); j < len; ++j) {			final boolean curslash = sb.charAt(j) == '/';			if (curslash && slash && j != 1) {				sb.deleteCharAt(j);				--j; --len;			}			slash = curslash;		}		if (sb.length() > 1 && slash)//remove ending slash except "/"			sb.setLength(sb.length() - 1);		//remove ./		while (sb.length() >= 2 && sb.charAt(0) == '.' && sb.charAt(1) == '/')			sb.delete(0, 2); // "./" -> ""		//remove /./		for (int j = 0; (j = sb.indexOf( "/./", j)) >= 0;)			sb.delete(j + 1, j + 3); // "/./" -> "/"		//ends with "/."		int len = sb.length();		if (len >= 2 && sb.charAt(len - 1) == '.' && sb.charAt(len - 2) == '/')			if (len == 2) return "/";			else sb.delete(len - 2, len);		//remove /../		for (int j = 0; (j = sb.indexOf("/../", j)) >= 0;)			j = removeDotDot(sb, j);		// ends with "/.."		len = sb.length();		if (len >= 3 && sb.charAt(len - 1) == '.' && sb.charAt(len - 2) == '.'		&& sb.charAt(len - 3) == '/') 			if (len == 3) return "/";			else removeDotDot(sb, len - 3);		return sb.length() == path.length() ? path: sb.toString();	}	/** Removes "/..".	 * @param j points '/' in "/.."	 * @return the next index to search from	 */	static private int removeDotDot(StringBuffer sb, int j) {		int k = j;		while (--k >= 0 && sb.charAt(k) != '/') 			;		if (k + 3 == j && sb.charAt(k + 1) == '.' && sb.charAt(k + 2) == '.')			return j + 4; // don't touch: "../.."		sb.delete(j, j + 3); // "/.." -> ""		if (j == 0) // "/.."			return 0;		if (k < 0) { // "a/+" => kill "a/", "a" => kill a			sb.delete(0, j < sb.length() ? j + 1: j);			return 0;		}		// "/a/+" => kill "/a", "/a" => kill "a"		if (j >= sb.length()) ++k;		sb.delete(k, j);		return k;	}	//--Object--//	public boolean equals(Object o) {		return o instanceof Path && ((Path)o)._path.equals(_path);	}	public int hashCode() {		return _path.hashCode();	}	public String toString() {		return _path;	}}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲bt欧美bt精品777| 欧美剧在线免费观看网站| 欧美影视一区在线| 亚洲综合无码一区二区| 欧美综合天天夜夜久久| 久草在线在线精品观看| 欧美一区二区三区在线视频| 日韩综合一区二区| 欧美电影免费观看高清完整版在线观看| 日本美女视频一区二区| 国产午夜精品福利| 色偷偷久久一区二区三区| 亚洲国产一区二区a毛片| 精品伦理精品一区| 99国产欧美另类久久久精品| 一区二区三区四区不卡视频| 日韩欧美精品在线| 欧美精品一区二区三区视频| 91久久精品网| 国产不卡视频在线观看| 亚洲五码中文字幕| 日韩高清一级片| 精品制服美女久久| 99免费精品在线观看| 精品无人码麻豆乱码1区2区| 国产精品中文字幕一区二区三区| 午夜精品福利在线| 亚洲色图.com| 国产欧美va欧美不卡在线| 91精品国产91综合久久蜜臀| 久久久蜜桃精品| 精品免费国产一区二区三区四区| 久久久精品日韩欧美| 亚洲女同ⅹxx女同tv| 国产欧美视频在线观看| 亚洲精品视频免费看| 国产日产欧美一区二区三区 | 免费成人你懂的| 亚洲资源在线观看| 久久国产精品一区二区| 亚洲bdsm女犯bdsm网站| 国产一区在线观看视频| 精品一区二区三区视频在线观看| 国产一区二区三区高清播放| 色婷婷久久99综合精品jk白丝| 欧美一区二区三区公司| 亚洲国产精品一区二区www| 国产综合久久久久影院| 久久国产免费看| 91视频观看视频| 欧美一a一片一级一片| 精品国产人成亚洲区| 亚洲乱码日产精品bd| 国产乱妇无码大片在线观看| 91久久精品日日躁夜夜躁欧美| 精品卡一卡二卡三卡四在线| 亚洲精品老司机| 国产成人av福利| 国产毛片一区二区| 欧美日韩国产高清一区| 日韩一区二区免费视频| xnxx国产精品| 最新成人av在线| 久久精品国产亚洲5555| 欧美日韩一区 二区 三区 久久精品| 欧美丝袜自拍制服另类| 亚洲女人****多毛耸耸8| 国产乱人伦偷精品视频免下载| 日韩一区二区三区在线| 婷婷综合在线观看| 色综合视频一区二区三区高清| 久久精品亚洲麻豆av一区二区| 日韩和欧美一区二区三区| gogo大胆日本视频一区| 亚洲国产高清aⅴ视频| 亚洲视频免费观看| 不卡一区在线观看| 欧美日韩免费观看一区二区三区 | 欧美精品久久天天躁| 一区二区三区在线视频免费| 91网站视频在线观看| 一区二区在线观看免费视频播放| 91污在线观看| 亚洲精品国产成人久久av盗摄| 91在线观看免费视频| 综合激情成人伊人| 色一情一乱一乱一91av| 亚洲免费在线视频一区 二区| 91天堂素人约啪| 日本一道高清亚洲日美韩| 69堂国产成人免费视频| 中文字幕精品一区| 成人免费视频视频在线观看免费| 欧美理论片在线| 日韩精品电影一区亚洲| 欧美变态口味重另类| 久久国产三级精品| 国产精品成人在线观看| 精品一区二区三区影院在线午夜| 精品伦理精品一区| 成人av电影免费观看| 亚洲日本电影在线| 5566中文字幕一区二区电影| 麻豆成人综合网| 欧美午夜精品久久久| 日韩成人一级片| 国产日韩欧美亚洲| 91日韩在线专区| 美女mm1313爽爽久久久蜜臀| 国产天堂亚洲国产碰碰| 色综合天天综合网天天狠天天| 久久综合久久综合九色| av中文字幕一区| 日韩影院精彩在线| 国产精品色在线| 高清久久久久久| 激情成人综合网| 亚洲品质自拍视频网站| 日韩午夜小视频| 色综合中文综合网| 欧美三级中文字幕| 国产高清无密码一区二区三区| 亚洲欧美日韩一区二区| 日韩情涩欧美日韩视频| 97久久超碰国产精品电影| 蜜臀av性久久久久蜜臀aⅴ| 国产精品久久影院| 日韩欧美国产麻豆| 日本久久一区二区| 国产精品中文字幕日韩精品| 午夜视频一区二区| 亚洲精品伦理在线| 国产日产欧美一区| 欧美va在线播放| 6080日韩午夜伦伦午夜伦| 99久久精品费精品国产一区二区| 美女一区二区在线观看| 婷婷综合五月天| 亚洲综合在线免费观看| 国产日韩影视精品| 精品国产乱码久久久久久夜甘婷婷| 色婷婷激情综合| 91在线高清观看| 国产盗摄女厕一区二区三区| 五月开心婷婷久久| 午夜影视日本亚洲欧洲精品| 亚洲三级小视频| 国产精品久久久久影视| 久久久99久久精品欧美| 欧美xxxxxxxxx| 欧美一级xxx| 欧美一卡2卡三卡4卡5免费| 在线观看亚洲精品| 日本丰满少妇一区二区三区| 菠萝蜜视频在线观看一区| 国内精品免费**视频| 极品少妇一区二区三区精品视频| 日韩av中文在线观看| 日本成人在线网站| 理论片日本一区| 美女国产一区二区| 国精产品一区一区三区mba视频| 精品无人码麻豆乱码1区2区| 国产精品自拍av| 成人精品鲁一区一区二区| 欧美疯狂性受xxxxx喷水图片| 欧美午夜寂寞影院| 777久久久精品| xfplay精品久久| 国产精品三级电影| 亚洲男人的天堂在线aⅴ视频| 亚洲美女屁股眼交3| 亚洲午夜久久久久久久久电影网 | 日韩亚洲欧美在线| 久久天堂av综合合色蜜桃网| 国产视频一区二区在线| 国产女人aaa级久久久级| 国产精品久久久久久久第一福利 | 欧美日韩另类一区| 日韩欧美一二三| 国产精品丝袜黑色高跟| 亚洲乱码国产乱码精品精可以看| 一区二区成人在线| 麻豆精品一二三| 成人一区在线看| 欧美怡红院视频| 久久久久国产一区二区三区四区| 国产欧美一二三区| 亚洲一区影音先锋| 久久er精品视频| 国产91精品露脸国语对白| 欧美性生活影院| 久久午夜电影网| 亚洲小说春色综合另类电影| 免费一级片91| 色综合久久99| 久久久亚洲精品石原莉奈| 依依成人综合视频| 国产激情视频一区二区三区欧美| 欧美午夜寂寞影院|