I would like to use SwingBoxDocument to convert to another Document type like RTF. I need a small subset of attributes for instance font styles like bold, italic, size, color, subscript etc.
My expectation that a code something like this would provide with them:
Hi,
I would like to use SwingBoxDocument to convert to another Document type like RTF. I need a small subset of attributes for instance font styles like bold, italic, size, color, subscript etc.
My expectation that a code something like this would provide with them:
Element leaf = e.getElement(idx);
AttributeSet attributeSet = leaf.getAttributes()
StyleConstants.isSubscript(attributeSet)
StyleConstants.isBold(attributeSet)
...
This however does not work. Debugging shows some attributes that has nothing to do with the desired style info.
How can I find the corresponding internal attribute representations?
Thank you!