本文整理了Java中javax.swing.text.AttributeSet.isEqual()
方法的一些代码示例,展示了AttributeSet.isEqual()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeSet.isEqual()
方法的具体详情如下:
包路径:javax.swing.text.AttributeSet
类名称:AttributeSet
方法名:isEqual
暂无
代码示例来源:origin: chatty/chatty
/**
* Retrieves a single style from the StyleServer and compares it to
* the previously saved style.
*
* @param name
* @return true if the style has changed, false otherwise
*/
private boolean loadStyle(String name) {
MutableAttributeSet newStyle = styleServer.getStyle(name);
AttributeSet oldStyle = rawStyles.get(name);
if (oldStyle != null && oldStyle.isEqual(newStyle)) {
// Nothing in the style has changed, so nothing further to do
return false;
}
// Save immutable copy of new style for next comparison
rawStyles.put(name, newStyle.copyAttributes());
// Add type attribute to the style, so it can be recognized when
// refreshing the styles in the document
newStyle.addAttribute(TYPE, name);
styles.put(name, newStyle);
return true;
}
代码示例来源:origin: org.gosu-lang.gosu/gosu-lab
Element leaf = getCharacterElement( branch.getStartOffset() );
AttributeSet as = leaf.getAttributes();
if( as.isEqual( _comment ) )
代码示例来源:origin: nz.ac.waikato.cms.weka/weka-stable
AttributeSet as = leaf.getAttributes();
if (as.isEqual(DEFAULT_COMMENT)) {
applyHighlighting(content, i);
代码示例来源:origin: stackoverflow.com
AttributeSet as = leaf.getAttributes();
if ( as.isEqual(comment) )
代码示例来源:origin: Waikato/weka-trunk
AttributeSet as = leaf.getAttributes();
if (as.isEqual(DEFAULT_COMMENT)) {
applyHighlighting(content, i);
内容来源于网络,如有侵权,请联系作者删除!