public abstract class EditorKit extends Object implements Cloneable, Serializable
一个工具包可以安全地存储编辑状态作为工具包的一个实例将被专用于一个文本组件。新的试剂盒通常是通过克隆原型试剂盒来创建的。它有它的setComponent
方法称为建立这一jtextcomponent关系。
Constructor and Description |
---|
EditorKit()
构建一个editorkit。
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
创建编辑器组件的副本。
|
abstract Caret |
createCaret()
获取一个符号,可以通过浏览相关的ViewFactory产生的看法。
|
abstract Document |
createDefaultDocument()
创建一个未初始化的文本存储模式,这种类型的编辑器是合适的。
|
void |
deinstall(JEditorPane c)
当包被从jeditorpane删除。
|
abstract Action[] |
getActions()
获取可用于文本组件,使用该试剂盒模型和视图的命令集。
|
abstract String |
getContentType()
获取此试剂盒是支持数据的MIME类型。
|
abstract ViewFactory |
getViewFactory()
取一个工厂,适合生产任何模型,该试剂盒的看法。
|
void |
install(JEditorPane c)
当包被安装到一个jeditorpane。
|
abstract void |
read(InputStream in, Document doc, int pos)
从给定的流中插入内容,该内容预计将在适合这种内容处理程序的格式中进行。
|
abstract void |
read(Reader in, Document doc, int pos)
从给定的流中插入内容,该内容预计将在适合这种内容处理程序的格式中进行。
|
abstract void |
write(OutputStream out, Document doc, int pos, int len)
将内容从文档以适当的格式将内容写入到给定的流中。
|
abstract void |
write(Writer out, Document doc, int pos, int len)
将内容从文档以适当的格式将内容写入到给定的流中。
|
public Object clone()
Object.clone()
。如果该套件无法被克隆,则返回。
public void install(JEditorPane c)
c
- JEditorPane
public void deinstall(JEditorPane c)
c
- JEditorPane
public abstract String getContentType()
public abstract ViewFactory getViewFactory()
public abstract Action[] getActions()
public abstract Caret createCaret()
public abstract Document createDefaultDocument()
public abstract void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException
in
流--读
doc
-插入目的地。
pos
-在文档中的位置放置内容> = 0。
IOException
-任何I/O错误
BadLocationException
如果POS代表文档中的一个无效的位置。
public abstract void write(OutputStream out, Document doc, int pos, int len) throws IOException, BadLocationException
out
流-写
doc
为写源。
pos
-在文档中的位置去> = 0的含量。
len
量-写> = 0。
IOException
-任何I/O错误
BadLocationException
如果POS代表文档中的一个无效的位置。
public abstract void read(Reader in, Document doc, int pos) throws IOException, BadLocationException
由于实际的文本编辑是基于Unicode,这一般会在读取数据的首选方式。某些类型的内容存储在一个8位的形式,然而,将有利于InputStream。
in
流--读
doc
-插入目的地。
pos
-在文档中的位置放置内容> = 0。
IOException
-任何I/O错误
BadLocationException
如果POS代表文档中的一个无效的位置。
public abstract void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException
由于实际的文本编辑是基于Unicode,这一般会写数据的首选方式。某些类型的内容存储在一个8位的形式,然而,将有利于OutputStream。
out
流-写
doc
为写源。
pos
-在文档中的位置取内容> = 0。
len
量-写> = 0。
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.