All Packages Class Hierarchy This Package Previous Next Index
Class com.sun.java.swing.text.EditorKit
java.lang.Object
|
+----com.sun.java.swing.text.EditorKit
- public abstract class EditorKit
- extends Object
This is the set of things needed by a text component
to be a reasonably functioning editor for some type
of text document. This acts as a factory for some
kind of policy. For example, a default implementation
of html and rtf can be provided that are replaceable
with other implementations.
-
EditorKit()
-
-
createDefaultDocument()
- Create an uninitialized text storage model
that is appropriate for this type of editor.
-
getActions()
- Fetch the set of commands that can be used
on a text component that is using a model and
view produced by this kit.
-
getViewFactory()
- Fetch a factory that is suitable for producing
views of any models that are produced by this
kit.
-
read(Reader, Object)
- Create and initialize a model from the given
stream which is expected to be in a format appropriate
for this kind of editor.
-
write(Writer, Document)
- Save the model to the given stream in a format that is
appropriate for this kind of editor.
EditorKit
public EditorKit()
getViewFactory
public abstract ViewFactory getViewFactory()
- Fetch a factory that is suitable for producing
views of any models that are produced by this
kit.
getActions
public abstract Action[] getActions()
- Fetch the set of commands that can be used
on a text component that is using a model and
view produced by this kit.
createDefaultDocument
public abstract Document createDefaultDocument()
- Create an uninitialized text storage model
that is appropriate for this type of editor.
read
public abstract Document read(Reader in,
Object desc) throws IOException
- Create and initialize a model from the given
stream which is expected to be in a format appropriate
for this kind of editor.
- Parameters:
- in - The stream to read from
- desc - An object describing the stream. This
might be a string, a File, a URL, etc. Some kinds
of documents (such as html for example) might be
able to make use of this information.
write
public abstract void write(Writer out,
Document doc) throws IOException
- Save the model to the given stream in a format that is
appropriate for this kind of editor.
All Packages Class Hierarchy This Package Previous Next Index