本文整理了Java中javax.swing.text.html.HTMLEditorKit.getInputAttributes()
方法的一些代码示例,展示了HTMLEditorKit.getInputAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HTMLEditorKit.getInputAttributes()
方法的具体详情如下:
包路径:javax.swing.text.html.HTMLEditorKit
类名称:HTMLEditorKit
方法名:getInputAttributes
暂无
代码示例来源:origin: stackoverflow.com
AttributeSet attSet = ((HTMLEditorKit)jep.getEditorKit()).getInputAttributes();
return StyleConstants.isBold(attSet);
代码示例来源: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);
}
}
}
内容来源于网络,如有侵权,请联系作者删除!