src/share/classes/javax/swing/text/html/HTMLEditorKit.java

Print this page

        

@@ -158,10 +158,11 @@
  * be rearranged.
  * </dl>
  *
  * @author  Timothy Prinzing
  */
+@SuppressWarnings("serial") // Same-version serialization only
 public class HTMLEditorKit extends StyledEditorKit implements Accessible {
 
     private JEditorPane theEditor;
 
     /**

@@ -638,10 +639,11 @@
 
     /**
      * Class to watch the associated component and fire
      * hyperlink events on it when appropriate.
      */
+    @SuppressWarnings("serial") // Same-version serialization only
     public static class LinkController extends MouseAdapter implements MouseMotionListener, Serializable {
         private Element curElem = null;
         /**
          * If true, the current element (curElem) represents an image.
          */

@@ -1480,10 +1482,11 @@
      * be useful in inserting HTML into an existing document.
      * <p>NOTE: None of the convenience methods obtain a lock on the
      * document. If you have another thread modifying the text these
      * methods may have inconsistent behavior, or return the wrong thing.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static abstract class HTMLTextAction extends StyledTextAction {
         public HTMLTextAction(String name) {
             super(name);
         }
 

@@ -1590,10 +1593,11 @@
      * like &lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;.
      * <p>There is also an option to supply an alternate parentTag and
      * addTag. These will be checked for if there is no parentTag at
      * offset.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     public static class InsertHTMLTextAction extends HTMLTextAction {
         public InsertHTMLTextAction(String name, String html,
                                     HTML.Tag parentTag, HTML.Tag addTag) {
             this(name, html, parentTag, addTag, null, null);
         }

@@ -1821,10 +1825,11 @@
     /**
      * InsertHRAction is special, at actionPerformed time it will determine
      * the parent HTML.Tag based on the paragraph element at the selection
      * start.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class InsertHRAction extends InsertHTMLTextAction {
         InsertHRAction() {
             super("InsertHR", "<hr>", null, HTML.Tag.IMPLIED, null, null,
                   false);
         }

@@ -1875,10 +1880,11 @@
      * Action to move the focus on the next or previous hypertext link
      * or object. TODO: This method relies on support from the
      * javax.accessibility package.  The text package should support
      * keyboard navigation of text elements directly.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class NavigateLinkAction extends TextAction implements CaretListener {
 
         private static final FocusHighlightPainter focusPainter =
             new FocusHighlightPainter(null);
         private final boolean focusBack;

@@ -2084,10 +2090,11 @@
      * Action to activate the hypertext link that has focus.
      * TODO: This method relies on support from the
      * javax.accessibility package.  The text package should support
      * keyboard navigation of text elements directly.
      */
+    @SuppressWarnings("serial") // Superclass is not serializable across versions
     static class ActivateLinkAction extends TextAction {
 
         /**
          * Create this action with the appropriate identifier.
          */

@@ -2257,11 +2264,11 @@
     /*
      * Move the caret to the beginning of the document.
      * @see DefaultEditorKit#beginAction
      * @see HTMLEditorKit#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);