| 
 | JavaTM 2 Platform Standard Ed. 5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
javax.swing.text.StyledEditorKit
public class StyledEditorKit
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.
| Nested Class Summary | |
|---|---|
| static class | StyledEditorKit.AlignmentActionAn action to set paragraph alignment. | 
| static class | StyledEditorKit.BoldActionAn action to toggle the bold attribute. | 
| static class | StyledEditorKit.FontFamilyActionAn action to set the font family in the associated JEditorPane. | 
| static class | StyledEditorKit.FontSizeActionAn action to set the font size in the associated JEditorPane. | 
| static class | StyledEditorKit.ForegroundActionAn action to set foreground color. | 
| static class | StyledEditorKit.ItalicActionAn action to toggle the italic attribute. | 
| static class | StyledEditorKit.StyledTextActionAn action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed. | 
| static class | StyledEditorKit.UnderlineActionAn action to toggle the underline attribute. | 
| Nested classes/interfaces inherited from class javax.swing.text.DefaultEditorKit | 
|---|
| DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction | 
| Field Summary | 
|---|
| Constructor Summary | |
|---|---|
| StyledEditorKit()Creates a new EditorKit used for styled documents. | |
| Method Summary | |
|---|---|
|  Object | clone()Creates a copy of the editor kit. | 
|  Document | createDefaultDocument()Creates an uninitialized text storage model that is appropriate for this type of editor. | 
| protected  void | createInputAttributes(Element element,
                      MutableAttributeSet set)Copies the key/values in elements AttributeSet intoset. | 
|  void | deinstall(JEditorPane c)Called when the kit is being removed from the JEditorPane. | 
|  Action[] | getActions()Fetches the command list for the editor. | 
|  Element | getCharacterAttributeRun()Fetches the element representing the current run of character attributes for the caret. | 
|  MutableAttributeSet | getInputAttributes()Gets the input attributes for the pane. | 
|  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 a JEditorPane. | 
| Methods inherited from class javax.swing.text.DefaultEditorKit | 
|---|
| createCaret, getContentType, read, read, write, write | 
| Methods inherited from class java.lang.Object | 
|---|
| equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public StyledEditorKit()
| Method Detail | 
|---|
public MutableAttributeSet getInputAttributes()
public Element getCharacterAttributeRun()
public Action[] getActions()
getActions in class DefaultEditorKitpublic Document createDefaultDocument()
createDefaultDocument in class DefaultEditorKitpublic void install(JEditorPane c)
install in class EditorKitc - the JEditorPanepublic void deinstall(JEditorPane c)
deinstall in class EditorKitc - the JEditorPanepublic ViewFactory getViewFactory()
getViewFactory in class DefaultEditorKitpublic Object clone()
clone in class EditorKitCloneable
protected void createInputAttributes(Element element,
                                     MutableAttributeSet set)
elements 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.
| 
 | JavaTM 2 Platform Standard Ed. 5.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Copyright 2004 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.