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

x33g5p2x  于2022-01-25 转载在 其他  
字(3.6k)|赞(0)|评价(0)|浏览(105)

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

MutableAttributeSet.removeAttributes介绍

暂无

代码示例

代码示例来源:origin: girtel/Net2Plan

to.removeAttributes(to);
if (from != null)

代码示例来源:origin: girtel/Net2Plan

@Override
  protected void writeAttributes(AttributeSet attr) throws IOException
  {
    convAttr.removeAttributes(convAttr);
    convertToHTML(attr, convAttr);
    Enumeration names = convAttr.getAttributeNames();
    while (names.hasMoreElements())
    {
      Object name = names.nextElement();
      if (name instanceof HTML.Tag || name instanceof StyleConstants || name == HTML.Attribute.ENDTAG) continue;
      write(" " + name + "=\"" + convAttr.getAttribute(name) + "\"");
    }
  }
}

代码示例来源:origin: net.sf.mmax2/mmax2

/** OK */        
public final void bulkApplyStyleToMarkableHandle(int characterPosition, AttributeSet s, boolean replace)
{
  Element run = null;
  MutableAttributeSet attr = null;                               
  run = getCharacterElement(characterPosition); 
  attr = (MutableAttributeSet) run.getAttributes();            
  if (replace) attr.removeAttributes(attr);
  attr.addAttributes(s);                
}

代码示例来源:origin: net.sf.mmax2/mmax2

/** OK */
public final void bulkApplyStyleToDiscourseElement(int discourseElementStartPosition, AttributeSet s, boolean replace) 
{        
    try 
    {
      Element run = null;
      MutableAttributeSet attr = null;
                    run = getCharacterElement(discourseElementStartPosition);           
      try
      {
        attr = (MutableAttributeSet) run.getAttributes();
        if (replace) attr.removeAttributes(attr);	                               
        attr.addAttributes(s);                
      }
      catch (java.lang.Error ex)
      {
        ex.printStackTrace();
      }                                
    }// try  
    catch (java.lang.Exception ex)
    {
      ex.printStackTrace();
    }
}

代码示例来源:origin: freeplane/freeplane

@Override
  protected void writeAttributes(final AttributeSet attr) throws IOException {
    if (attr instanceof Element) {
      final Element elem = (Element) attr;
      if (elem.isLeaf() || elem.getName().equalsIgnoreCase("p-implied")) {
        super.writeAttributes(attr);
        return;
      }
    }
    convAttr.removeAttributes(convAttr);
    FixedHTMLWriter.convertToHTML(attr, convAttr);
    final Enumeration<?> names = convAttr.getAttributeNames();
    while (names.hasMoreElements()) {
      final Object name = names.nextElement();
      if (name instanceof HTML.Tag || name instanceof StyleConstants || name == HTML.Attribute.ENDTAG) {
        continue;
      }
      write(" " + name + "=\"" + convAttr.getAttribute(name) + "\"");
    }
  }
}

代码示例来源:origin: stackoverflow.com

k.getInputAttributes().removeAttributes(set);

代码示例来源:origin: stackoverflow.com

to.removeAttributes(to);
  if (from != null)
protected void writeAttributes(AttributeSet attr) throws IOException
  convAttr.removeAttributes(convAttr);
  convertToHTML(attr, convAttr);
  Enumeration names = convAttr.getAttributeNames();

代码示例来源:origin: org.apache.maven.doxia/doxia-module-xdoc

/**
 * The default align is <code>center</code>.
 *
 * {@inheritDoc}
 * @see javax.swing.text.html.HTML.Tag#TABLE
 */
public void tableRows( int[] justification, boolean grid )
{
  // similar to super.tableRows( justification, grid ) but without class.
  this.tableRows = true;
  setCellJustif( justification );
  if ( this.tableAttributes == null )
  {
    this.tableAttributes = new SinkEventAttributeSet( 0 );
  }
  MutableAttributeSet att = new SinkEventAttributeSet();
  if ( !tableAttributes.isDefined( Attribute.BORDER.toString() ) )
  {
    att.addAttribute( Attribute.BORDER, ( grid ? "1" : "0" ) );
  }
  att.addAttributes( tableAttributes );
  tableAttributes.removeAttributes( tableAttributes );
  writeStartTag( TABLE, att );
}

代码示例来源:origin: protegeproject/protege

Style style = getStyle(name);
changes.addEdit(new AttributeUndoableEdit(run, style, true));
attr.removeAttributes(attr);
attr.addAttributes(style);

相关文章