本文整理了Java中javax.swing.text.MutableAttributeSet.addAttributes()
方法的一些代码示例,展示了MutableAttributeSet.addAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MutableAttributeSet.addAttributes()
方法的具体详情如下:
包路径:javax.swing.text.MutableAttributeSet
类名称:MutableAttributeSet
方法名:addAttributes
暂无
代码示例来源:origin: stackoverflow.com
MutableAttributeSet inputAttr = textPane.getInputAttributes();
inputAttr.addAttributes(red);
代码示例来源:origin: omegat-org/omegat
void createInputAttributes(Element element, MutableAttributeSet set) {
set.addAttributes(attrs(false, false, false, false));
}
代码示例来源: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: stackoverflow.com
textPane2.getCaret().setDot(textPane2.getText().length());
MutableAttributeSet inputAttributes = textPane2.getInputAttributes();
inputAttributes.addAttributes(set);
代码示例来源:origin: pentaho/pentaho-reporting
for ( int i = muxList.size() - 1; i >= 0; i-- ) {
final AttributeSet o = muxList.get( i );
retval.addAttributes( o );
代码示例来源:origin: org.apache.maven.doxia/doxia-module-fo
cellAtts.addAttributes( config.getAttributeSet( "table.body.cell.grid" ) );
代码示例来源:origin: org.apache.maven.doxia/doxia-module-fo
/** {@inheritDoc} */
public void figureGraphics( String src, SinkEventAttributes attributes )
{
MutableAttributeSet atts = config.getAttributeSet( "figure.graphics" );
atts.addAttribute( Attribute.SRC.toString(), src );
// http://xmlgraphics.apache.org/fop/graphics.html#resolution
final String[] valids = new String[] {"content-height", "content-width", "height", "width"};
final MutableAttributeSet filtered = SinkUtils.filterAttributes( attributes, valids );
if ( filtered != null )
{
atts.addAttributes( filtered );
}
writeln( "<fo:external-graphic" + SinkUtils.getAttributeString( atts ) + "/>" );
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui
public void actionPerformed(ActionEvent e)
{
if(!(this.isEnabled()))
{
return;
}
JEditorPane editor = getEditor(e);
if(editor != null)
{
String stylename = (String)(parent.getSelectedItem());
if(stylename == null)
{
return;
}
else if(stylename.equals(Translatrix.getTranslationString("NoCSSStyle")))
{
return;
}
boolean replace = false;
MutableAttributeSet attr = null;
SimpleAttributeSet cls = new SimpleAttributeSet();
cls.addAttribute(HTML.Attribute.CLASS, stylename);
attr = new SimpleAttributeSet();
attr.addAttribute(HTML.Tag.FONT, cls);
MutableAttributeSet inattr = ((HTMLEditorKit)(editor.getEditorKitForContentType("text/html"))).getInputAttributes();
inattr.addAttributes(attr);
setCharacterAttributes(editor, attr, replace);
}
}
}
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui
attr.addAttributes(a);
changes.end();
fireChangedUpdate(changes);
代码示例来源: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: org.apache.maven.doxia/doxia-module-xdoc
atts.addAttributes( attributes );
代码示例来源:origin: protegeproject/protege
changes.addEdit(new AttributeUndoableEdit(run, style, true));
attr.removeAttributes(attr);
attr.addAttributes(style);
内容来源于网络,如有侵权,请联系作者删除!