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.


Constructor Index

 o EditorKit()

Method Index

 o createDefaultDocument()
Create an uninitialized text storage model that is appropriate for this type of editor.
 o 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.
 o getViewFactory()
Fetch a factory that is suitable for producing views of any models that are produced by this kit.
 o 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.
 o write(Writer, Document)
Save the model to the given stream in a format that is appropriate for this kind of editor.

Constructors

 o EditorKit
 public EditorKit()

Methods

 o getViewFactory
 public abstract ViewFactory getViewFactory()
Fetch a factory that is suitable for producing views of any models that are produced by this kit.

 o 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.

 o createDefaultDocument
 public abstract Document createDefaultDocument()
Create an uninitialized text storage model that is appropriate for this type of editor.

 o 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.
 o 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