javax.swing.text.rtf
public class RTFEditorKit extends StyledEditorKit
JEditorPane
s.StyledEditorKit.AlignmentAction, StyledEditorKit.BoldAction, StyledEditorKit.FontFamilyAction, StyledEditorKit.FontSizeAction, StyledEditorKit.ForegroundAction, StyledEditorKit.ItalicAction, StyledEditorKit.StyledTextAction, StyledEditorKit.UnderlineAction
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deletePrevCharAction, downAction, endAction, endLineAction, EndOfLineStringProperty, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, upAction, writableAction
Constructor and Description |
---|
RTFEditorKit()
Constructs a new RTFEditorKit.
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
Returns the MIME content type.
|
void |
read(InputStream stream,
Document doc,
int pos)
Reads RTF data from
stream into doc at the
specified position pos . |
void |
read(Reader reader,
Document doc,
int pos)
Reads RTF data from
reader into doc at the
specified position pos . |
clone, createDefaultDocument, createInputAttributes, deinstall, getActions, getCharacterAttributeRun, getInputAttributes, getViewFactory, install
createCaret, write, write
public RTFEditorKit()
public String getContentType()
getContentType
in class DefaultEditorKit
public void read(InputStream stream, Document doc, int pos) throws IOException, BadLocationException
stream
into doc
at the
specified position pos
.read
in class DefaultEditorKit
stream
- the InputStream
from where we read RTF datadoc
- the Document
into which we read the RTF datapos
- the position where to startIOException
- if an IO error occursBadLocationException
- if the position is not validpublic void read(Reader reader, Document doc, int pos) throws IOException, BadLocationException
reader
into doc
at the
specified position pos
.read
in class DefaultEditorKit
reader
- the Reader
from where we read RTF datadoc
- the Document
into which we read the RTF datapos
- the position where to startIOException
- if an IO error occursBadLocationException
- if the position is not valid