java.lang.Objectjavax.swing.text.EditorKit
javax.swing.text.DefaultEditorKit
javax.swing.text.StyledEditorKit
All Implemented Interfaces:
Cloneable, Serializable
Direct Known Subclasses:
MyHTMLEditorKit, RTFEditorKit, BasicEditorKit, HTMLEditorKit
Timothy
- PrinzingNested Class Summary: | ||
---|---|---|
class | StyledEditorKit.AttributeTracker | Tracks caret movement and keeps the input attributes set
to reflect the current set of attribute definitions at the
caret position.
This implements PropertyChangeListener to update the input attributes when the Document changes, as if the Document changes the attributes will almost certainly change. |
static class | StyledEditorKit.StyledViewFactory | |
abstract public static class | StyledEditorKit.StyledTextAction | An action that assumes it's being fired on a JEditorPane
with a StyledEditorKit (or subclass) installed. This has
some convenience methods for causing character or paragraph
level attribute changes. The convenience methods will
throw an IllegalArgumentException if the assumption of
a StyledDocument, a JEditorPane, or a StyledEditorKit
fail to be true.
The component that gets acted upon by the action will be the source of the ActionEvent if the source can be narrowed to a JEditorPane type. If the source can't be narrowed, the most recently focused text component is changed. If neither of these are the case, the action cannot be performed.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the |
public static class | StyledEditorKit.FontFamilyAction | An action to set the font family in the associated
JEditorPane. This will use the family specified as
the command string on the ActionEvent if there is one,
otherwise the family that was initialized with will be used.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the |
public static class | StyledEditorKit.FontSizeAction | An action to set the font size in the associated
JEditorPane. This will use the size specified as
the command string on the ActionEvent if there is one,
otherwise the size that was initialized with will be used.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the |
public static class | StyledEditorKit.ForegroundAction | An action to set foreground color. This sets the
StyleConstants.Foreground attribute for the
currently selected range of the target JEditorPane.
This is done by calling
StyledDocument.setCharacterAttributes
on the styled document associated with the target
JEditorPane.
If the target text component is specified as the
source of the ActionEvent and there is a command string,
the command string will be interpreted as the foreground
color. It will be interpreted by called
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the |
public static class | StyledEditorKit.AlignmentAction | An action to set paragraph alignment. This sets the
StyleConstants.Alignment attribute for the
currently selected range of the target JEditorPane.
This is done by calling
StyledDocument.setParagraphAttributes
on the styled document associated with the target
JEditorPane.
If the target text component is specified as the
source of the ActionEvent and there is a command string,
the command string will be interpreted as an integer
that should be one of the legal values for the
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the |
public static class | StyledEditorKit.BoldAction | An action to toggle the bold attribute.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the |
public static class | StyledEditorKit.ItalicAction | An action to toggle the italic attribute.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the |
public static class | StyledEditorKit.UnderlineAction | An action to toggle the underline attribute.
Warning:
Serialized objects of this class will not be compatible with
future Swing releases. The current serialization support is
appropriate for short term storage or RMI between applications running
the same version of Swing. As of 1.4, support for long term storage
of all JavaBeansTM
has been added to the |
static class | StyledEditorKit.StyledInsertBreakAction | StyledInsertBreakAction has similar behavior to that of
DefaultEditorKit.InsertBreakAction . That is when
its actionPerformed method is invoked, a newline
is inserted. Beyond that, this will reset the input attributes to
what they were before the newline was inserted. |
Field Summary | ||
---|---|---|
Element | currentRun | |
Element | currentParagraph | |
MutableAttributeSet | inputAttributes | This is the set of attributes used to store the input attributes. |
Constructor: |
---|
|
Method from javax.swing.text.StyledEditorKit Summary: |
---|
clone, createDefaultDocument, createInputAttributes, deinstall, getActions, getCharacterAttributeRun, getInputAttributes, getViewFactory, install |
Methods from javax.swing.text.DefaultEditorKit: |
---|
createCaret, createDefaultDocument, getActions, getContentType, getInputAttributes, getViewFactory, read, read, write, write |
Methods from javax.swing.text.EditorKit: |
---|
clone, createCaret, createDefaultDocument, deinstall, getActions, getContentType, getViewFactory, install, read, read, write, write |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from javax.swing.text.StyledEditorKit Detail: |
---|
|
|
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. |
|
|
|
|
|
|