本文整理汇总了Java中org.w3c.dom.css.CSSStyleSheet.getDisabled方法的典型用法代码示例。如果您正苦于以下问题:Java CSSStyleSheet.getDisabled方法的具体用法?Java CSSStyleSheet.getDisabled怎么用?Java CSSStyleSheet.getDisabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.w3c.dom.css.CSSStyleSheet
的用法示例。
在下文中一共展示了CSSStyleSheet.getDisabled方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: equals
import org.w3c.dom.css.CSSStyleSheet; //导入方法依赖的package包/类
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof CSSStyleSheet)) {
return false;
}
final CSSStyleSheet css = (CSSStyleSheet) obj;
boolean eq = LangUtils.equals(getCssRules(), css.getCssRules());
eq = eq && (getDisabled() == css.getDisabled());
eq = eq && LangUtils.equals(getHref(), css.getHref());
eq = eq && LangUtils.equals(getMedia(), css.getMedia());
// TODO implement some reasonful equals method for ownerNode
// eq = eq && Utils.equals(getOwnerNode(), css.getOwnerNode());
// don't use ownerNode and parentStyleSheet in equals()
// recursive loop -> stack overflow!
eq = eq && LangUtils.equals(getTitle(), css.getTitle());
return eq;
}
示例2: isAffectedByPseudoNameInAncestor
import org.w3c.dom.css.CSSStyleSheet; //导入方法依赖的package包/类
/**
* is affected by pseudo name in ancestor
*
* @param elementRules
* @param ancestor
* @param element
* @param pseudoName
* @return
*/
private boolean isAffectedByPseudoNameInAncestor(Collection<StyleRuleInfo> elementRules, HTMLElementImpl ancestor,
HTMLElementImpl element, String pseudoName) {
if (elementRules != null) {
Iterator<StyleRuleInfo> i = elementRules.iterator();
while (i.hasNext()) {
StyleRuleInfo styleRuleInfo = i.next();
CSSStyleSheet styleSheet = styleRuleInfo.getStyleRule().getParentStyleSheet();
if (styleSheet != null && styleSheet.getDisabled()) {
continue;
}
if (styleRuleInfo.affectedByPseudoNameInAncestor(element, ancestor, pseudoName)) {
return true;
}
}
}
return false;
}
示例3: putStyleDeclarations
import org.w3c.dom.css.CSSStyleSheet; //导入方法依赖的package包/类
/**
* put style declarations
*
* @param elementRules
* @param styleDeclarations
* @param element
* @param pseudoNames
* @return
*/
private Collection<CSSStyleDeclaration> putStyleDeclarations(Collection<StyleRuleInfo> elementRules,
Collection<CSSStyleDeclaration> styleDeclarations, HTMLElementImpl element, Set pseudoNames) {
Iterator<StyleRuleInfo> i = elementRules.iterator();
while (i.hasNext()) {
StyleRuleInfo styleRuleInfo = i.next();
if (styleRuleInfo.isSelectorMatch(element, pseudoNames)) {
CSSStyleRule styleRule = styleRuleInfo.getStyleRule();
CSSStyleSheet styleSheet = styleRule.getParentStyleSheet();
if (styleSheet != null && styleSheet.getDisabled()) {
continue;
}
if (styleDeclarations == null) {
styleDeclarations = new LinkedList<CSSStyleDeclaration>();
}
styleDeclarations.add(styleRule.getStyle());
}
}
return styleDeclarations;
}