src/share/classes/javax/swing/text/StyledEditorKit.java
Print this page
@@ -43,10 +43,11 @@
* provides a minimal set of actions for editing styled text.
*
* @author Timothy Prinzing
*/
public class StyledEditorKit extends DefaultEditorKit {
+ private static final long serialVersionUID = 7002391892985555948L;
/**
* Creates a new EditorKit used for styled documents.
*/
public StyledEditorKit() {
@@ -168,10 +169,11 @@
}
/**
* Creates the AttributeSet used for the selection.
*/
+ @SuppressWarnings("serial") // anonymous class
private void createInputAttributes() {
inputAttributes = new SimpleAttributeSet() {
public AttributeSet getResolveParent() {
return (currentParagraph != null) ?
currentParagraph.getAttributes() : null;
@@ -216,10 +218,11 @@
* caret position.
* <p>This implements PropertyChangeListener to update the
* input attributes when the Document changes, as if the Document
* changes the attributes will almost certainly change.
*/
+ @SuppressWarnings("serial") // JDK-implementation class
class AttributeTracker implements CaretListener, PropertyChangeListener, Serializable {
/**
* Updates the attributes. <code>dot</code> and <code>mark</code>
* mark give the positions of the selection in <code>c</code>.
@@ -852,10 +855,11 @@
* <code>DefaultEditorKit.InsertBreakAction</code>. That is when
* its <code>actionPerformed</code> method is invoked, a newline
* is inserted. Beyond that, this will reset the input attributes to
* what they were before the newline was inserted.
*/
+ @SuppressWarnings("serial") // Superclass is not serializable across versions
static class StyledInsertBreakAction extends StyledTextAction {
private SimpleAttributeSet tempSet;
StyledInsertBreakAction() {
super(insertBreakAction);