I have managed to extend the editor including with an indent action. For an action class that extends StyledEditorKit.StyledTextAction the key code is,
MutableAttributeSet mutableAttributeSet = new SimpleAttributeSet();
StyleConstants.setLeftIndent(mutableAttributeSet, <indent value>);
setParagraphAttributes(editor, mutableAttributeSet, false);
But an attempt to set paragraph spacing similarly fails
MutableAttributeSet mutableAttributeSet = new SimpleAttributeSet();
StyleConstants.setLineSpacing(mutableAttributeSet, 2.0f);
setParagraphAttributes(editor, mutableAttributeSet, false);
Does anybody have an idea why this doesn't work???
extending the editor
Under discussion
Comments
- Popular
- New
- Old
You must be signed in to leave a comment
This page doesn't have any comments yet