java.lang.Object | |||
↳ | javax.swing.text.EditorKit | ||
↳ | javax.swing.text.DefaultEditorKit | ||
↳ | javax.swing.text.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 Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
StyledEditorKit.AlignmentAction | An action to set paragraph alignment. | ||||||||||
StyledEditorKit.BoldAction | An action to toggle the bold attribute. | ||||||||||
StyledEditorKit.FontFamilyAction | An action to set the font family in the associated JEditorPane. | ||||||||||
StyledEditorKit.FontSizeAction | An action to set the font size in the associated JEditorPane. | ||||||||||
StyledEditorKit.ForegroundAction | An action to set foreground color. | ||||||||||
StyledEditorKit.ItalicAction | An action to toggle the italic attribute. | ||||||||||
StyledEditorKit.StyledTextAction | An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed. | ||||||||||
StyledEditorKit.UnderlineAction | An action to toggle the underline attribute. |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a new EditorKit used for styled documents.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Creates a copy of the editor kit.
| |||||||||||
Creates an uninitialized text storage model
that is appropriate for this type of editor.
| |||||||||||
Called when the kit is being removed from the
JEditorPane.
| |||||||||||
Fetches the command list for the editor.
| |||||||||||
Fetches the element representing the current
run of character attributes for the caret.
| |||||||||||
Gets the input attributes for the pane.
| |||||||||||
Fetches a factory that is suitable for producing
views of any models that are produced by this
kit.
| |||||||||||
Called when the kit is being installed into
a JEditorPane.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Copies the key/values in
element s AttributeSet into
set . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() |
Creates a new EditorKit used for styled documents.
Creates an uninitialized text storage model that is appropriate for this type of editor.
Called when the kit is being removed from the JEditorPane. This is used to unregister any listeners that were attached.
c | the JEditorPane |
---|
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.
Fetches the element representing the current run of character attributes for the caret.
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.
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:
Called when the kit is being installed into a JEditorPane.
c | the JEditorPane |
---|
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.