| |
|
| java.lang.Object javax.swing.text.EditorKit javax.swing.text.DefaultEditorKit javax.swing.text.StyledEditorKit
All known Subclasses: javax.swing.text.html.HTMLEditorKit, javax.swing.text.rtf.RTFEditorKit,
StyledEditorKit | public class StyledEditorKit extends DefaultEditorKit (Code) | | This is the set of things needed by a text component
to be a reasonably functioning editor for some type
of text document. This implementation provides a default
implementation which treats text as styled text and
provides a minimal set of actions for editing styled text.
author: Timothy Prinzing version: 1.52 05/05/07 |
Inner Class :static class StyledViewFactory implements ViewFactory | |
Inner Class :abstract public static class StyledTextAction extends TextAction | |
Inner Class :public static class FontFamilyAction extends StyledTextAction | |
Inner Class :public static class FontSizeAction extends StyledTextAction | |
Inner Class :public static class ForegroundAction extends StyledTextAction | |
Inner Class :public static class AlignmentAction extends StyledTextAction | |
Inner Class :public static class BoldAction extends StyledTextAction | |
Inner Class :public static class ItalicAction extends StyledTextAction | |
Inner Class :public static class UnderlineAction extends StyledTextAction | |
Inner Class :static class StyledInsertBreakAction extends StyledTextAction | |
Constructor Summary | |
public | StyledEditorKit() Creates a new EditorKit used for styled documents. |
StyledEditorKit | public StyledEditorKit()(Code) | | Creates a new EditorKit used for styled documents.
|
clone | public Object clone()(Code) | | Creates a copy of the editor kit.
the copy |
createDefaultDocument | public Document createDefaultDocument()(Code) | | Creates an uninitialized text storage model
that is appropriate for this type of editor.
the model |
createInputAttributes | protected void createInputAttributes(Element element, MutableAttributeSet set)(Code) | | Copies the key/values in element s AttributeSet into
set . This does not copy component, icon, or element
names attributes. Subclasses may wish to refine what is and what
isn't copied here. But be sure to first remove all the attributes that
are in set .
This is called anytime the caret moves over a different location.
|
deinstall | public void deinstall(JEditorPane c)(Code) | | Called when the kit is being removed from the
JEditorPane. This is used to unregister any
listeners that were attached.
Parameters: c - the JEditorPane |
getActions | public Action[] getActions()(Code) | | Fetches the command list for the editor. This is
the list of commands supported by the superclass
augmented by the collection of commands defined
locally for style operations.
the command list |
getCharacterAttributeRun | public Element getCharacterAttributeRun()(Code) | | Fetches the element representing the current
run of character attributes for the caret.
the element |
getInputAttributes | public MutableAttributeSet getInputAttributes()(Code) | | Gets the input attributes for the pane. When
the caret moves and there is no selection, the
input attributes are automatically mutated to
reflect the character attributes of the current
caret location. The styled editing actions
use the input attributes to carry out their
actions.
the attribute set |
getViewFactory | public ViewFactory getViewFactory()(Code) | | Fetches a factory that is suitable for producing
views of any models that are produced by this
kit. This is implemented to return View implementations
for the following kinds of elements:
- AbstractDocument.ContentElementName
- AbstractDocument.ParagraphElementName
- AbstractDocument.SectionElementName
- StyleConstants.ComponentElementName
- StyleConstants.IconElementName
the factory |
install | public void install(JEditorPane c)(Code) | | Called when the kit is being installed into
a JEditorPane.
Parameters: c - the JEditorPane |
Methods inherited from javax.swing.text.DefaultEditorKit | public Caret createCaret()(Code)(Java Doc) public Document createDefaultDocument()(Code)(Java Doc) public Action[] getActions()(Code)(Java Doc) public String getContentType()(Code)(Java Doc) MutableAttributeSet getInputAttributes()(Code)(Java Doc) public ViewFactory getViewFactory()(Code)(Java Doc) public void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException(Code)(Java Doc) public void read(Reader in, Document doc, int pos) throws IOException, BadLocationException(Code)(Java Doc) public void write(OutputStream out, Document doc, int pos, int len) throws IOException, BadLocationException(Code)(Java Doc) public void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException(Code)(Java Doc)
|
Methods inherited from javax.swing.text.EditorKit | public Object clone()(Code)(Java Doc) abstract public Caret createCaret()(Code)(Java Doc) abstract public Document createDefaultDocument()(Code)(Java Doc) public void deinstall(JEditorPane c)(Code)(Java Doc) abstract public Action[] getActions()(Code)(Java Doc) abstract public String getContentType()(Code)(Java Doc) abstract public ViewFactory getViewFactory()(Code)(Java Doc) public void install(JEditorPane c)(Code)(Java Doc) abstract public void read(InputStream in, Document doc, int pos) throws IOException, BadLocationException(Code)(Java Doc) abstract public void read(Reader in, Document doc, int pos) throws IOException, BadLocationException(Code)(Java Doc) abstract public void write(OutputStream out, Document doc, int pos, int len) throws IOException, BadLocationException(Code)(Java Doc) abstract public void write(Writer out, Document doc, int pos, int len) throws IOException, BadLocationException(Code)(Java Doc)
|
|
|
|