javax.swing.text.rtf
Class RTFEditorKit
java.lang.Object
javax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
javax.swing.text.StyledEditorKit
javax.swing.text.rtf.RTFEditorKit
- All Implemented Interfaces:
- Serializable, Cloneable
public class RTFEditorKit
- extends StyledEditorKit
Provides support for RTF data for use in
JEditorPane
s.
- See Also:
- Serialized Form
Fields inherited from class javax.swing.text.DefaultEditorKit |
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 Summary |
RTFEditorKit()
Constructs a new RTFEditorKit. |
RTFEditorKit
public RTFEditorKit()
- Constructs a new RTFEditorKit.
getContentType
public String getContentType()
- Returns the MIME content type. In the case of RTFEditorKit this is
'text/rtf'
- Overrides:
getContentType
in class DefaultEditorKit
- Returns:
- the MIME content type for RTFEditorKit
read
public void read(InputStream stream,
Document doc,
int pos)
throws IOException,
BadLocationException
- Reads RTF data from
stream
into doc
at the
specified position pos
.
- Overrides:
read
in class DefaultEditorKit
- Parameters:
stream
- the InputStream
from where we read RTF datadoc
- the Document
into which we read the RTF datapos
- the position where to start
- Throws:
IOException
- if an IO error occurs
BadLocationException
- if the position is not valid
read
public void read(Reader reader,
Document doc,
int pos)
throws IOException,
BadLocationException
- Reads RTF data from
reader
into doc
at the
specified position pos
.
- Overrides:
read
in class DefaultEditorKit
- Parameters:
reader
- the Reader
from where we read RTF datadoc
- the Document
into which we read the RTF datapos
- the position where to start
- Throws:
IOException
- if an IO error occurs
BadLocationException
- if the position is not valid