src/share/classes/javax/swing/text/DefaultEditorKit.java

Print this page

        

@@ -69,10 +69,11 @@
  * </dl>
  *
  * @author  Timothy Prinzing
  */
 public class DefaultEditorKit extends EditorKit {
+    private static final long serialVersionUID = 2948709989644140410L;
 
     /**
      * default constructor for DefaultEditorKit
      */
     public DefaultEditorKit() {

@@ -1030,10 +1031,11 @@
      * Deletes the character of content that precedes the
      * current caret position.
      * @see DefaultEditorKit#deletePrevCharAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class DeletePrevCharAction extends TextAction {
 
         /**
          * Creates this object with the appropriate identifier.
          */

@@ -1088,10 +1090,11 @@
      * Deletes the character of content that follows the
      * current caret position.
      * @see DefaultEditorKit#deleteNextCharAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class DeleteNextCharAction extends TextAction {
 
         /* Create this object with the appropriate identifier. */
         DeleteNextCharAction() {
             super(deleteNextCharAction);

@@ -1139,10 +1142,11 @@
 
     /*
      * Deletes the word that precedes/follows the beginning of the selection.
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class DeleteWordAction extends TextAction {
         DeleteWordAction(String name) {
             super(name);
             assert (name == deletePrevWordAction)
                 || (name == deleteNextWordAction);

@@ -1213,10 +1217,11 @@
     /*
      * Sets the editor into read-only mode.
      * @see DefaultEditorKit#readOnlyAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class ReadOnlyAction extends TextAction {
 
         /* Create this object with the appropriate identifier. */
         ReadOnlyAction() {
             super(readOnlyAction);

@@ -1238,10 +1243,11 @@
     /*
      * Sets the editor into writeable mode.
      * @see DefaultEditorKit#writableAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class WritableAction extends TextAction {
 
         /* Create this object with the appropriate identifier. */
         WritableAction() {
             super(writableAction);

@@ -1412,10 +1418,11 @@
      *
      * @see DefaultEditorKit#pageUpAction
      * @see DefaultEditorKit#pageDownAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class VerticalPageAction extends TextAction {
 
         /** Create this object with the appropriate identifier. */
         public VerticalPageAction(String nm, int direction, boolean select) {
             super(nm);

@@ -1571,10 +1578,11 @@
 
 
     /**
      * Pages one view to the left or right.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class PageAction extends TextAction {
 
         /** Create this object with the appropriate identifier. */
         public PageAction(String nm, boolean left, boolean select) {
             super(nm);

@@ -1625,10 +1633,11 @@
 
         private boolean select;
         private boolean left;
     }
 
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class DumpModelAction extends TextAction {
 
         DumpModelAction() {
             super("dump-model");
         }

@@ -1647,10 +1656,11 @@
     /*
      * Action to move the selection by way of the
      * getNextVisualPositionFrom method. Constructor indicates direction
      * to use.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class NextVisualPositionAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -1734,10 +1744,11 @@
      * Position the caret to the beginning of the word.
      * @see DefaultEditorKit#beginWordAction
      * @see DefaultEditorKit#selectBeginWordAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class BeginWordAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -1774,10 +1785,11 @@
      * Position the caret to the end of the word.
      * @see DefaultEditorKit#endWordAction
      * @see DefaultEditorKit#selectEndWordAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class EndWordAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -1814,10 +1826,11 @@
      * Position the caret to the beginning of the previous word.
      * @see DefaultEditorKit#previousWordAction
      * @see DefaultEditorKit#selectPreviousWordAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class PreviousWordAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -1873,10 +1886,11 @@
      * Position the caret to the next of the word.
      * @see DefaultEditorKit#nextWordAction
      * @see DefaultEditorKit#selectNextWordAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class NextWordAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -1938,10 +1952,11 @@
      * Position the caret to the beginning of the line.
      * @see DefaultEditorKit#beginLineAction
      * @see DefaultEditorKit#selectBeginLineAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class BeginLineAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -1978,10 +1993,11 @@
      * Position the caret to the end of the line.
      * @see DefaultEditorKit#endLineAction
      * @see DefaultEditorKit#selectEndLineAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class EndLineAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -2018,10 +2034,11 @@
      * Position the caret to the beginning of the paragraph.
      * @see DefaultEditorKit#beginParagraphAction
      * @see DefaultEditorKit#selectBeginParagraphAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class BeginParagraphAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -2055,10 +2072,11 @@
      * Position the caret to the end of the paragraph.
      * @see DefaultEditorKit#endParagraphAction
      * @see DefaultEditorKit#selectEndParagraphAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class EndParagraphAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -2092,10 +2110,11 @@
     /*
      * Move the caret to the beginning of the document.
      * @see DefaultEditorKit#beginAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class BeginAction extends TextAction {
 
         /* Create this object with the appropriate identifier. */
         BeginAction(String nm, boolean select) {
             super(nm);

@@ -2120,10 +2139,11 @@
     /*
      * Move the caret to the end of the document.
      * @see DefaultEditorKit#endAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class EndAction extends TextAction {
 
         /* Create this object with the appropriate identifier. */
         EndAction(String nm, boolean select) {
             super(nm);

@@ -2150,10 +2170,11 @@
     /*
      * Select the word around the caret
      * @see DefaultEditorKit#endAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class SelectWordAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -2179,10 +2200,11 @@
     /*
      * Select the line around the caret
      * @see DefaultEditorKit#endAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class SelectLineAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -2208,10 +2230,11 @@
     /*
      * Select the paragraph around the caret
      * @see DefaultEditorKit#endAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class SelectParagraphAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -2237,10 +2260,11 @@
     /*
      * Select the entire document
      * @see DefaultEditorKit#endAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class SelectAllAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          * @param nm  the name of the action, Action.NAME.

@@ -2266,10 +2290,11 @@
     /*
      * Remove the selection, if any.
      * @see DefaultEditorKit#unselectAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class UnselectAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          */

@@ -2290,10 +2315,11 @@
     /*
      * Toggles the ComponentOrientation of the text component.
      * @see DefaultEditorKit#toggleComponentOrientationAction
      * @see DefaultEditorKit#getActions
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class ToggleComponentOrientationAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          */