本文整理了Java中javax.swing.JTextPane.getCharacterAttributes()
方法的一些代码示例,展示了JTextPane.getCharacterAttributes()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JTextPane.getCharacterAttributes()
方法的具体详情如下:
包路径:javax.swing.JTextPane
类名称:JTextPane
方法名:getCharacterAttributes
暂无
代码示例来源:origin: beanshell/beanshell
private AttributeSet getStyle() {
return text.getCharacterAttributes();
}
代码示例来源:origin: stackoverflow.com
JTextPane myTextPane = new JTextPane();
SimpleAttributeSet sas = new SimpleAttributeSet(myTextPane.getCharacterAttributes());
代码示例来源:origin: stackoverflow.com
Color newTextColor = JColorChooser.showDialog(this, "Choose a Color", Color.black);
SimpleAttributeSet sas = new SimpleAttributeSet(myTextPane.getCharacterAttributes());
StyleConstants.setForeground(sas, newTextColor);
try {
代码示例来源:origin: stackoverflow.com
AttributeSet attributes = jTextPane1.getCharacterAttributes();
System.out.println("Bold " + attributes.containsAttribute(StyleConstants.Bold, Boolean.TRUE));
System.out.println("Italic " + attributes.containsAttribute("Italic " + StyleConstants.Italic, Boolean.TRUE));
代码示例来源:origin: stackoverflow.com
AttributeSet attributes = myJTextComponent.getCharacterAttributes();
String attributeFamily = attributes.getAttribute(StyleConstants.FontFamily).toString();
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui
AttributeSet mainAttrs = jtpMain.getCharacterAttributes();
Enumeration e = mainAttrs.getAttributeNames();
Object activeFontName = (Object) (Translatrix.getTranslationString("SelectorToolFontsDefaultFont"));
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui
sasText = new SimpleAttributeSet(parentTextPane.getCharacterAttributes());
Enumeration attribEntries1 = sasText.getAttributeNames();
while(attribEntries1.hasMoreElements() && currentAnchor.equals(""))
insertAttribute(sasAttr, entryKey, entryValue);
SimpleAttributeSet baseAttrs = new SimpleAttributeSet(parentEkit.getTextPane().getCharacterAttributes());
Enumeration attribEntriesOriginal = baseAttrs.getAttributeNames();
while(attribEntriesOriginal.hasMoreElements())
代码示例来源:origin: stackoverflow.com
public Color getColor() {
return StyleConstants.getForeground(muTextPane.getCharacterAttributes());
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui
} else if (command.equals("whattags")) {
System.out.println("Caret Position : " + jtpMain.getCaretPosition());
AttributeSet attribSet = jtpMain.getCharacterAttributes();
Enumeration attribs = attribSet.getAttributeNames();
System.out.println("Attributes : ");
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-ui
public void actionPerformed(ActionEvent e) {
JTextPane parentTextPane = core_.getTextPane();
SimpleAttributeSet sasText = new SimpleAttributeSet(parentTextPane.getCharacterAttributes());
SimpleAttributeSet sasPara = new SimpleAttributeSet(parentTextPane.getParagraphAttributes());
String selText = parentTextPane.getSelectedText();
内容来源于网络,如有侵权,请联系作者删除!