Serializable
, Cloneable
HTMLEditorKit
, RTFEditorKit
public class StyledEditorKit extends DefaultEditorKit
Modifier and Type | Class | Description |
---|---|---|
static class |
StyledEditorKit.AlignmentAction |
An action to set paragraph alignment. |
static class |
StyledEditorKit.BoldAction |
An action to toggle the bold attribute. |
static class |
StyledEditorKit.FontFamilyAction |
An action to set the font family in the associated JEditorPane. |
static class |
StyledEditorKit.FontSizeAction |
An action to set the font size in the associated JEditorPane. |
static class |
StyledEditorKit.ForegroundAction |
An action to set foreground color. |
static class |
StyledEditorKit.ItalicAction |
An action to toggle the italic attribute. |
static class |
StyledEditorKit.StyledTextAction |
An action that assumes it's being fired on a JEditorPane with a StyledEditorKit (or subclass) installed. |
static class |
StyledEditorKit.UnderlineAction |
An action to toggle the underline attribute. |
DefaultEditorKit.BeepAction, DefaultEditorKit.CopyAction, DefaultEditorKit.CutAction, DefaultEditorKit.DefaultKeyTypedAction, DefaultEditorKit.InsertBreakAction, DefaultEditorKit.InsertContentAction, DefaultEditorKit.InsertTabAction, DefaultEditorKit.PasteAction
backwardAction, beepAction, beginAction, beginLineAction, beginLineUpAction, beginParagraphAction, beginWordAction, copyAction, cutAction, defaultKeyTypedAction, deleteNextCharAction, deleteNextWordAction, deletePrevCharAction, deletePrevWordAction, downAction, endAction, endLineAction, endLineDownAction, EndOfLineStringProperty, 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 | Description |
---|---|
StyledEditorKit() |
Creates a new EditorKit used for styled documents. |
Modifier and Type | Method | Description |
---|---|---|
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 |
Copies the key/values in element s AttributeSet into set . |
void |
deinstall |
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 |
Called when the kit is being installed into a JEditorPane. |
createCaret, getContentType, read, read, write, write
public StyledEditorKit()
public MutableAttributeSet getInputAttributes()
public Element getCharacterAttributeRun()
public Action[] getActions()
getActions
in class DefaultEditorKit
public Document createDefaultDocument()
createDefaultDocument
in class DefaultEditorKit
public void install(JEditorPane c)
public void deinstall(JEditorPane c)
public ViewFactory getViewFactory()
getViewFactory
in class DefaultEditorKit
public Object clone()
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
- the elementset
- the attributes
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.desktop/javax/swing/text/StyledEditorKit.html