当前位置: 首页>>代码示例>>Java>>正文


Java Locator类代码示例

本文整理汇总了Java中org.w3c.css.sac.Locator的典型用法代码示例。如果您正苦于以下问题:Java Locator类的具体用法?Java Locator怎么用?Java Locator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Locator类属于org.w3c.css.sac包,在下文中一共展示了Locator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: _class

import org.w3c.css.sac.Locator; //导入依赖的package包/类
final public Condition _class(Condition pred) throws ParseException {
	Token t;
	Locator locator;
	try {
		jj_consume_token(DOT);
		locator = createLocator(token);
		t = jj_consume_token(IDENT);
		Condition c = getConditionFactory().createClassCondition(null, t.image);
		if (c instanceof Locatable) {
			((Locatable) c).setLocator(locator);
		}
		return (pred == null) ? c : getConditionFactory().createAndCondition(pred, c);
	} catch (ParseException e) {
		throw toCSSParseException("invalidClassSelector", e);
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:17,代码来源:SACParserCSS1.java

示例2: _class

import org.w3c.css.sac.Locator; //导入依赖的package包/类
final public Condition _class(Condition pred, boolean pseudoElementFound) throws ParseException {
	Token t;
	Locator locator;
	ParseException pe = null;
	try {
		if (pseudoElementFound) {
			pe = generateParseException();
		}
		jj_consume_token(DOT);
		locator = createLocator(token);
		t = jj_consume_token(IDENT);
		if (pseudoElementFound) {
			throw pe;
		}
		Condition c = getConditionFactory().createClassCondition(null, unescape(t.image, false));
		if (c instanceof Locatable) {
			((Locatable) c).setLocator(locator);
		}
		return (pred == null) ? c : getConditionFactory().createAndCondition(pred, c);
	} catch (ParseException e) {
		throw toCSSParseException("invalidClassSelector", e);
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:24,代码来源:SACParserCSS21.java

示例3: _class

import org.w3c.css.sac.Locator; //导入依赖的package包/类
final public Condition _class(Condition pred) throws ParseException {
	Token t;
	Locator locator;
	try {
		jj_consume_token(DOT);
		locator = this.createLocator(token);
		t = jj_consume_token(IDENT);
		Condition c = this.getConditionFactory().createClassCondition(null, t.image);
		if (c instanceof Locatable) {
			((Locatable) c).setLocator(locator);
		}
		return (pred == null) ? c : this.getConditionFactory().createAndCondition(pred, c);
	} catch (ParseException e) {
		throw this.toCSSParseException("invalidClassSelector", e);
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:17,代码来源:SACParserCSSmobileOKBasic1.java

示例4: _class

import org.w3c.css.sac.Locator; //导入依赖的package包/类
final public Condition _class(Condition pred, boolean pseudoElementFound) throws ParseException {
	Token t;
	Locator locator;
	ParseException pe = null;
	try {
		if (pseudoElementFound) {
			pe = generateParseException();
		}
		jj_consume_token(DOT);
		locator = createLocator(token);
		t = jj_consume_token(IDENT);
		if (pseudoElementFound) {
			throw pe;
		}
		Condition c = getConditionFactory().createClassCondition(null, t.image);
		if (c instanceof Locatable) {
			((Locatable) c).setLocator(locator);
		}
		return (pred == null) ? c : getConditionFactory().createAndCondition(pred, c);
	} catch (ParseException e) {
		throw toCSSParseException("invalidClassSelector", e);
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:24,代码来源:SACParserCSS2.java

示例5: startMedia

import org.w3c.css.sac.Locator; //导入依赖的package包/类
@Override
public void startMedia(final SACMediaList media, final Locator locator) throws CSSException {
	final MediaListImpl ml = new MediaListImpl(media);
	// Create the media rule and add it to the rule list
	final CSSMediaRuleImpl mr = new CSSMediaRuleImpl(CSSOMParser.this.getParentStyleSheet(), getParentRule(),
			ml);
	addLocator(locator, mr);
	if (!nodeStack_.empty()) {
		((CSSRuleListImpl) nodeStack_.peek()).add(mr);
	}

	// Create the rule list
	final CSSRuleListImpl rules = new CSSRuleListImpl();
	mr.setRuleList(rules);
	nodeStack_.push(mr);
	nodeStack_.push(rules);
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:18,代码来源:CSSOMParser.java

示例6: startPage

import org.w3c.css.sac.Locator; //导入依赖的package包/类
@Override
public void startPage(final String name, final String pseudoPage, final Locator locator) throws CSSException {
	// Create the page rule and add it to the rule list
	final CSSPageRuleImpl pr = new CSSPageRuleImpl(CSSOMParser.this.getParentStyleSheet(), getParentRule(),
			pseudoPage);
	addLocator(locator, pr);
	if (!nodeStack_.empty()) {
		((CSSRuleListImpl) nodeStack_.peek()).add(pr);
	}

	// Create the style declaration
	final CSSStyleDeclarationImpl decl = new CSSStyleDeclarationImpl(pr);
	pr.setStyle(decl);
	nodeStack_.push(pr);
	nodeStack_.push(decl);
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:17,代码来源:CSSOMParser.java

示例7: startFontFace

import org.w3c.css.sac.Locator; //导入依赖的package包/类
@Override
public void startFontFace(final Locator locator) throws CSSException {
	// Create the font face rule and add it to the rule list
	final CSSFontFaceRuleImpl ffr = new CSSFontFaceRuleImpl(CSSOMParser.this.getParentStyleSheet(),
			getParentRule());
	addLocator(locator, ffr);
	if (!nodeStack_.empty()) {
		((CSSRuleListImpl) nodeStack_.peek()).add(ffr);
	}

	// Create the style declaration
	final CSSStyleDeclarationImpl decl = new CSSStyleDeclarationImpl(ffr);
	ffr.setStyle(decl);
	nodeStack_.push(ffr);
	nodeStack_.push(decl);
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:17,代码来源:CSSOMParser.java

示例8: startSelector

import org.w3c.css.sac.Locator; //导入依赖的package包/类
@Override
public void startSelector(final SelectorList selectors, final Locator locator) throws CSSException {
	// Create the style rule and add it to the rule list
	final CSSStyleRuleImpl sr = new CSSStyleRuleImpl(CSSOMParser.this.getParentStyleSheet(), getParentRule(),
			selectors);
	addLocator(locator, sr);
	if (!nodeStack_.empty()) {
		final Object o = nodeStack_.peek();
		((CSSRuleListImpl) o).add(sr);
	}

	// Create the style declaration
	final CSSStyleDeclarationImpl decl = new CSSStyleDeclarationImpl(sr);
	sr.setStyle(decl);
	nodeStack_.push(sr);
	nodeStack_.push(decl);
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:18,代码来源:CSSOMParser.java

示例9: equals

import org.w3c.css.sac.Locator; //导入依赖的package包/类
@Override
public boolean equals(final Object obj) {
	if (this == obj) {
		return true;
	}
	if (!(obj instanceof Locator)) {
		return false;
	}
	final Locator l = (Locator) obj;
	return (getColumnNumber() == l.getColumnNumber()) && (getLineNumber() == l.getLineNumber())
			&& LangUtils.equals(getURI(), l.getURI());
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:13,代码来源:LocatorImpl.java

示例10: unknownAtRule

import org.w3c.css.sac.Locator; //导入依赖的package包/类
final public void unknownAtRule() throws ParseException {
	String s;
	Locator locator;
	try {
		jj_consume_token(ATKEYWORD);
		locator = createLocator(token);
		s = skip();
		handleIgnorableAtRule(s, locator);
	} catch (ParseException e) {
		getErrorHandler().error(toCSSParseException("invalidUnknownRule", e));
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:13,代码来源:SACParserCSS1.java

示例11: handleIgnorableAtRule

import org.w3c.css.sac.Locator; //导入依赖的package包/类
protected void handleIgnorableAtRule(final String s, final Locator locator) {
	final DocumentHandler documentHandler = getDocumentHandler();
	if (documentHandler instanceof DocumentHandlerExt) {
		((DocumentHandlerExt) documentHandler).ignorableAtRule(s, locator);
	} else {
		documentHandler.ignorableAtRule(s);
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:9,代码来源:AbstractSACParser.java

示例12: handleImportStyle

import org.w3c.css.sac.Locator; //导入依赖的package包/类
protected void handleImportStyle(final String uri, final SACMediaList media, final String defaultNamespaceURI,
		final Locator locator) {
	final DocumentHandler documentHandler = getDocumentHandler();
	if (documentHandler instanceof DocumentHandlerExt) {
		((DocumentHandlerExt) documentHandler).importStyle(uri, media, defaultNamespaceURI, locator);
	} else {
		documentHandler.importStyle(uri, media, defaultNamespaceURI);
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:10,代码来源:AbstractSACParser.java

示例13: handleStartMedia

import org.w3c.css.sac.Locator; //导入依赖的package包/类
protected void handleStartMedia(final SACMediaList media, final Locator locator) {
	final DocumentHandler documentHandler = getDocumentHandler();
	if (documentHandler instanceof DocumentHandlerExt) {
		((DocumentHandlerExt) documentHandler).startMedia(media, locator);
	} else {
		documentHandler.startMedia(media);
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:9,代码来源:AbstractSACParser.java

示例14: handleStartPage

import org.w3c.css.sac.Locator; //导入依赖的package包/类
protected void handleStartPage(final String name, final String pseudoPage, final Locator locator) {
	final DocumentHandler documentHandler = getDocumentHandler();
	if (documentHandler instanceof DocumentHandlerExt) {
		((DocumentHandlerExt) documentHandler).startPage(name, pseudoPage, locator);
	} else {
		documentHandler.startPage(name, pseudoPage);
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:9,代码来源:AbstractSACParser.java

示例15: handleStartFontFace

import org.w3c.css.sac.Locator; //导入依赖的package包/类
protected void handleStartFontFace(final Locator locator) {
	final DocumentHandler documentHandler = getDocumentHandler();
	if (documentHandler instanceof DocumentHandlerExt) {
		((DocumentHandlerExt) documentHandler).startFontFace(locator);
	} else {
		documentHandler.startFontFace();
	}
}
 
开发者ID:oswetto,项目名称:LoboEvolution,代码行数:9,代码来源:AbstractSACParser.java


注:本文中的org.w3c.css.sac.Locator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。