javax.swing.text.AttributeSet.isEqual()方法的使用及代码示例

x33g5p2x  于11个月前 转载在 其他  
字(1.5k)|赞(0)|评价(0)|浏览(33)

本文整理了Java中javax.swing.text.AttributeSet.isEqual()方法的一些代码示例,展示了AttributeSet.isEqual()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AttributeSet.isEqual()方法的具体详情如下:
包路径:javax.swing.text.AttributeSet
类名称:AttributeSet
方法名:isEqual

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);

相关文章