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 its
setComponent
method called to establish
its relationship with a JTextComponent.
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public Object | |
public abstract Caret | Returns: the caretFetches a caret that can navigate through views produced by the associated ViewFactory. |
public abstract Document | Returns: the modelCreates an uninitialized text storage model that is appropriate for this type of editor. |
public void | |
public abstract Action[] | Returns: the set of actionsFetches the set of commands that can be used on a text component that is using a model and view produced by this kit. |
public abstract String | Returns: the typeGets the MIME type of the data that this kit represents support for. |
public abstract ViewFactory | Returns: the factoryFetches a factory that is suitable for producing views of any models that are produced by this kit. |
public void | |
public abstract void | read(InputStream
The stream to read from in, Document The destination for the insertion. doc, int The location in the document to place the
content >= 0. pos)Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler. |
public abstract void | |
public abstract void | write(OutputStream
The stream to write to out, Document The source for the write. doc, int The location in the document to fetch the
content from >= 0. pos, int The amount to write out >= 0. len)Writes content from a document to the given stream in a format appropriate for this kind of content handler. |
public abstract void |
EditorKit | back to summary |
---|---|
public EditorKit() Construct an EditorKit. |
clone | back to summary |
---|---|
public Object clone() Overrides java. Creates a copy of the editor kit. This is implemented
to use
|
createCaret | back to summary |
---|---|
public abstract Caret createCaret() Fetches a caret that can navigate through views produced by the associated ViewFactory.
|
createDefaultDocument | back to summary |
---|---|
public abstract Document createDefaultDocument() Creates an uninitialized text storage model that is appropriate for this type of editor.
|
deinstall | back to summary |
---|---|
public void deinstall(JEditorPane c) Called when the kit is being removed from the JEditorPane. This is used to unregister any listeners that were attached.
|
getActions | back to summary |
---|---|
public abstract 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.
|
getContentType | back to summary |
---|---|
public abstract String getContentType() Gets the MIME type of the data that this kit represents support for.
|
getViewFactory | back to summary |
---|---|
public abstract ViewFactory getViewFactory() Fetches a factory that is suitable for producing views of any models that are produced by this kit.
|
install | back to summary |
---|---|
public void install(JEditorPane c) Called when the kit is being installed into the a JEditorPane.
|
read | back to summary |
---|---|
public abstract void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler.
|
read | back to summary |
---|---|
public abstract void read(Reader in, Document doc, int pos) throws IOException, BadLocationException Inserts content from the given stream which is expected to be in a format appropriate for this kind of content handler. 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.
|
write | back to summary |
---|---|
public abstract void write(OutputStream out, Document doc, int pos, int len) throws IOException, BadLocationException Writes content from a document to the given stream in a format appropriate for this kind of content handler.
|
write | back to summary |
---|---|
public abstract void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException Writes content from a document to the given stream in a format appropriate for this kind of content handler. 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.
|