public class RTFEditorKit extends StyledEditorKit
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, deleteNextWordAction, deletePrevCharAction, deletePrevWordAction, 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()
构建了一个rtfeditorkit。
|
Modifier and Type | Method and Description |
---|---|
String |
getContentType()
得到这盒代表支持数据的MIME类型。
|
void |
read(InputStream in, Document doc, int pos)
从给定的流中插入内容,该内容预计将在适合这种内容处理程序的格式中进行。
|
void |
read(Reader in, Document doc, int pos)
将内容从给定的流中插入,将被视为纯文本。
|
void |
write(OutputStream out, Document doc, int pos, int len)
用适当的格式将文档中的内容写入该类内容处理程序的格式中的内容。
|
void |
write(Writer out, Document doc, int pos, int len)
从文档到给定流的写入内容为纯文本。
|
clone, createDefaultDocument, createInputAttributes, deinstall, getActions, getCharacterAttributeRun, getInputAttributes, getViewFactory, install
createCaret
public String getContentType()
text/rtf
。
getContentType
方法重写,继承类
DefaultEditorKit
public void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException
read
方法重写,继承类
DefaultEditorKit
in
流--读
doc
-插入目的地。
pos
-在文档中的位置处的内容。
IOException
-
BadLocationException
如果POS代表文档中的一个无效的位置。
public void write(OutputStream out, Document doc, int pos, int len) throws IOException, BadLocationException
write
方法重写,继承类
DefaultEditorKit
out
流-写
doc
为写源。
pos
-在文档中的位置获取内容。
len
量-写出来。
IOException
-任何I/O错误
BadLocationException
如果POS代表文档中的一个无效的位置。
public void read(Reader in, Document doc, int pos) throws IOException, BadLocationException
read
方法重写,继承类
DefaultEditorKit
in
流--读
doc
-插入目的地。
pos
-在文档中的位置处的内容。
IOException
-任何I/O错误
BadLocationException
如果POS代表文档中的一个无效的位置。
public void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException
write
方法重写,继承类
DefaultEditorKit
out
流-写
doc
为写源。
pos
-在文档中的位置获取内容。
len
量-写出来。
IOException
-任何I/O错误
BadLocationException
如果POS代表文档中的一个无效的位置。
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.