public class RTFEditorKit extends StyledEditorKit
StyledEditorKit.AlignmentAction, StyledEditorKit.BoldAction, StyledEditorKit.FontFamilyAction, StyledEditorKit.FontSizeAction, StyledEditorKit.ForegroundAction, StyledEditorKit.ItalicAction, StyledEditorKit.StyledTextAction, StyledEditorKit.UnderlineActionDefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteActionbackwardAction, 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, installcreateCaretpublic String getContentType()
text/rtf型。
getContentType在
DefaultEditorKit类
public void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException
read在
DefaultEditorKit
in - 要读取的流
doc - 插入的目的地。
pos - 放置内容的文档中的位置。
IOException - 在任何I / O错误
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.