Overview | Package | Class | Tree | Deprecated | Index | Help Java Platform
1.1.7
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class com.sun.java.swing.text.StyledEditorKit

java.lang.Object
  |
  +--com.sun.java.swing.text.EditorKit
        |
        +--com.sun.java.swing.text.DefaultEditorKit
              |
              +--com.sun.java.swing.text.StyledEditorKit
Subclasses:
HTMLEditorKit, RTFEditorKit

public class StyledEditorKit
extends DefaultEditorKit
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.

See Also:
Serialized Form

Inner Class Summary
static  StyledEditorKit.AlignmentAction
          An action to set paragraph alignment.
static  StyledEditorKit.BoldAction
          An action to toggle the bold attribute.
static  StyledEditorKit.FontFamilyAction
          An action to set the font family in the associated JEditorPane.
static  StyledEditorKit.FontSizeAction
          An action to set the font size in the associated JEditorPane.
static  StyledEditorKit.ForegroundAction
          An action to set the foreground color in the focused JEditorPane by calling its setForeground method.
static  StyledEditorKit.ItalicAction
          An action to toggle the italic attribute.
static  StyledEditorKit.StyledTextAction
          An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed.
static  StyledEditorKit.UnderlineAction
          An action to toggle the underline attribute.
 
Inner classes inherited from class com.sun.java.swing.text.DefaultEditorKit
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction
 
Fields inherited from class com.sun.java.swing.text.DefaultEditorKit
backwardAction, beepAction, beginAction, beginLineAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deletePrevCharAction, downAction, endAction, endLineAction, endParagraphAction, endWordAction, forwardAction, insertBreakAction, insertContentAction, insertTabAction, nextWordAction, pageDownAction, pageUpAction, pasteAction, previousWordAction, readOnlyAction, selectAllAction, selectionBackwardAction, selectionBeginAction, selectionBeginLineAction, selectionBeginParagraphAction, selectionBeginWordAction, selectionDownAction, selectionEndAction, selectionEndLineAction, selectionEndParagraphAction, selectionEndWordAction, selectionForwardAction, selectionNextWordAction, selectionPreviousWordAction, selectionUpAction, selectLineAction, selectParagraphAction, selectWordAction, upAction, writableAction
 
Constructor Summary
StyledEditorKit()
           
 
Method Summary
java.lang.Object clone()
          Create a copy of the editor kit.
Document createDefaultDocument()
          Creates an uninitialized text storage model that is appropriate for this type of editor.
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 com.sun.java.swing.text.DefaultEditorKit
clone, createCaret, createDefaultDocument, getActions, getContentType, getViewFactory, read, read, write, write
 
Methods inherited from class com.sun.java.swing.text.EditorKit
clone, createCaret, createDefaultDocument, deinstall, getActions, getContentType, getViewFactory, install, read, read, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

StyledEditorKit

public StyledEditorKit()
Method Detail

getInputAttributes

public MutableAttributeSet getInputAttributes()
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.
Returns:
the attribute set

getCharacterAttributeRun

public Element getCharacterAttributeRun()
Fetches the element representing the current run of character attributes for the caret.
Returns:
the element

clone

public java.lang.Object clone()
Create a copy of the editor kit. This allows an implementation to serve as a prototype for others, so that they can be quickly created.
Returns:
the copy
Overrides:
clone in class DefaultEditorKit

getActions

public Action[] getActions()
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.
Returns:
the command list
Overrides:
getActions in class DefaultEditorKit

createDefaultDocument

public Document createDefaultDocument()
Creates an uninitialized text storage model that is appropriate for this type of editor.
Returns:
the model
Overrides:
createDefaultDocument in class DefaultEditorKit

install

public void install(JEditorPane c)
Called when the kit is being installed into a JEditorPane.
Parameters:
c - the JEditorPane
Overrides:
install in class EditorKit

deinstall

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.
Parameters:
c - the JEditorPane
Overrides:
deinstall in class EditorKit

getViewFactory

public ViewFactory getViewFactory()
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:
Returns:
the factory
Overrides:
getViewFactory in class DefaultEditorKit

Overview | Package | Class | Tree | Deprecated | Index | Help Java Platform
1.1.7
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Submit a bug or feature
Submit comments/suggestions about javadoc
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-1998 Sun Microsystems, Inc. 901 San Antonio Road,
Palo Alto, California, 94303, U.S.A. All Rights Reserved.