Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.sun.java.swing.text.EditorKit
A kit can safely store editing state as an instance
of the kit will be dedicated to a text component.
New kits will normally be created by cloning a
prototype kit. The kit will have it's
setComponent
method called to establish
it's relationship with a JTextComponent.
Constructor Summary | |
EditorKit()
|
Method Summary | |
java.lang.Object | clone()
Creates a copy of the editor kit. |
Caret | createCaret()
Fetches a caret that can navigate through views produced by the associated ViewFactory. |
Document | createDefaultDocument()
Creates an uninitialized text storage model that is appropriate for this type of editor. |
void | deinstall(JEditorPane c)
Called when the kit is being removed from the JEditorPane. |
Action[] | getActions()
Fetches the set of commands that can be used on a text component that is using a model and view produced by this kit. |
java.lang.String | getContentType()
Gets the MIME type of the data that this kit represents support for. |
ViewFactory | getViewFactory()
Fetches a factory that is suitable for producing views of any models that are produced by this kit. |
void | install(JEditorPane c)
Called when the kit is being installed into the a JEditorPane. |
void | read(java.io.InputStream in,
Document doc,
int pos)
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler. |
void | read(java.io.Reader in,
Document doc,
int pos)
Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler. |
void | write(java.io.OutputStream out,
Document doc,
int pos,
int len)
Writes content from a document to the given stream in a format appropriate for this kind of content handler. |
void | write(java.io.Writer out,
Document doc,
int pos,
int len)
Writes content from a document to the given stream in a format appropriate for this kind of content handler. |
Methods inherited from class java.lang.Object | |
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait |
Constructor Detail |
public EditorKit()
Method Detail |
public abstract java.lang.Object clone()
public void install(JEditorPane c)
c
- the JEditorPanepublic void deinstall(JEditorPane c)
c
- the JEditorPanepublic abstract java.lang.String getContentType()
public abstract ViewFactory getViewFactory()
public abstract Action[] getActions()
public abstract Caret createCaret()
public abstract Document createDefaultDocument()
public abstract void read(java.io.InputStream in, Document doc, int pos) throws java.io.IOException, BadLocationException
in
- The stream to read from
doc
- The destination for the insertion.
pos
- The location in the document to place the
content >= 0.public abstract void write(java.io.OutputStream out, Document doc, int pos, int len) throws java.io.IOException, BadLocationException
out
- The stream to write to
doc
- The source for the write.
pos
- The location in the document to fetch the
content from >= 0.
len
- The amount to write out >= 0.public abstract void read(java.io.Reader in, Document doc, int pos) throws java.io.IOException, BadLocationException
Since actual text editing is unicode based, this would generally be the preferred way to read in the data. Some types of content are stored in an 8-bit form however, and will favor the InputStream.
in
- The stream to read from
doc
- The destination for the insertion.
pos
- The location in the document to place the
content >= 0.public abstract void write(java.io.Writer out, Document doc, int pos, int len) throws java.io.IOException, BadLocationException
Since actual text editing is unicode based, this would generally be the preferred way to write the data. Some types of content are stored in an 8-bit form however, and will favor the OutputStream.
out
- The stream to write to
doc
- The source for the write.
pos
- The location in the document to fetch the
content >= 0.
len
- The amount to write out >= 0.Overview | Package | Class | Tree | Deprecated | Index | Help |
Java Platform 1.1.7 |
||
PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |