| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Nested Class Summary | |
---|---|
static class |
An action to set paragraph alignment. |
static class |
An action to toggle the bold attribute. |
static class |
An action to set the font family in the associated JEditorPane. |
static class |
An action to set the font size in the associated JEditorPane. |
static class |
An action to set foreground color. |
static class |
An action to toggle the italic attribute. |
abstract static class |
An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed. |
static class |
An 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 | |
---|---|
Creates a new EditorKit used for styled documents. |
Method Summary | |
---|---|
Object |
clone() Creates a copy of the editor kit. |
Document |
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 element s AttributeSet into
set .
|
void |
Called when the kit is being removed from the JEditorPane. |
Action[] |
Fetches the command list for the editor. |
Element |
Fetches the element representing the current run of character attributes for the caret. |
MutableAttributeSet |
Gets the input attributes for the pane. |
ViewFactory |
Fetches a factory that is suitable for producing views of any models that are produced by this kit. |
void |
Called when the kit is being installed into a JEditorPane. |
Methods inherited from class javax.swing.text.DefaultEditorKit |
---|
createCaret, createDefaultDocument, getActions, getContentType, getViewFactory, read, read, write, write |
Methods inherited from class javax.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, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StyledEditorKit()
Method Detail |
---|
public Object clone()
clone
in class EditorKit
public Document createDefaultDocument()
createDefaultDocument
in class DefaultEditorKit
protected void createInputAttributes(Element element, MutableAttributeSet set)
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.
element
set
public void deinstall(JEditorPane c)
deinstall
in class EditorKit
c
- the JEditorPanepublic Action[] getActions()
getActions
in class DefaultEditorKit
public Element getCharacterAttributeRun()
public MutableAttributeSet getInputAttributes()
getInputAttributes
in class DefaultEditorKit
public ViewFactory getViewFactory()
getViewFactory
in class DefaultEditorKit
public void install(JEditorPane c)
install
in class EditorKit
c
- the JEditorPane
| |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |