本文整理汇总了Java中cz.vutbr.web.css.CSSProperty.Cursor类的典型用法代码示例。如果您正苦于以下问题:Java Cursor类的具体用法?Java Cursor怎么用?Java Cursor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Cursor类属于cz.vutbr.web.css.CSSProperty包,在下文中一共展示了Cursor类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: processCursor
import cz.vutbr.web.css.CSSProperty.Cursor; //导入依赖的package包/类
@SuppressWarnings("unused")
private boolean processCursor(Declaration d,
Map<String, CSSProperty> properties, Map<String, Term<?>> values) {
if (d.size() == 1 && genericOneIdent(Cursor.class, d, properties)) {
return true;
} else {
final Set<Cursor> allowedCursors = EnumSet.complementOf(EnumSet
.of(Cursor.INHERIT));
TermList list = tf.createList();
Cursor cur = null;
for (Term<?> term : d.asList()) {
if (term instanceof TermURI) {
list.add(term);
} else if (term instanceof TermIdent
&& (cur = genericPropertyRaw(Cursor.class,
allowedCursors, (TermIdent) term)) != null) {
// this have to be the last cursor in sequence
// and only one generic cursor is allowed
if (d.indexOf(term) != d.size() - 1)
return false;
// passed as last cursor, insert into properties and values
properties.put("cursor", cur);
if (!list.isEmpty())
values.put("cursor", list);
return true;
} else
return false;
}
return false;
}
}