src/share/classes/com/sun/java/swing/plaf/windows/WindowsIconFactory.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -49,10 +49,11 @@
  *
  * @author David Kloba
  * @author Georges Saab
  * @author Rich Schiavi
  */
+@SuppressWarnings("serial") // Same-version serialization only
 public class WindowsIconFactory implements Serializable
 {
     private static Icon frame_closeIcon;
     private static Icon frame_iconifyIcon;
     private static Icon frame_maxIcon;

@@ -158,10 +159,11 @@
             frame_resizeIcon = new ResizeIcon();
         return frame_resizeIcon;
     }
 
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class FrameButtonIcon implements Icon, Serializable {
         private Part part;
 
         private FrameButtonIcon(Part part) {
             this.part = part;

@@ -294,10 +296,11 @@
         }
     }
 
 
 
+        @SuppressWarnings("serial") // Same-version serialization only
         private static class ResizeIcon implements Icon, Serializable {
             public void paintIcon(Component c, Graphics g, int x, int y) {
                 g.setColor(UIManager.getColor("InternalFrame.resizeIconHighlight"));
                 g.drawLine(0, 11, 11, 0);
                 g.drawLine(4, 11, 11, 4);

@@ -313,10 +316,11 @@
             }
             public int getIconWidth() { return 13; }
             public int getIconHeight() { return 13; }
         };
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class CheckBoxIcon implements Icon, Serializable
     {
         final static int csize = 13;
         public void paintIcon(Component c, Graphics g, int x, int y) {
             JCheckBox cb = (JCheckBox) c;

@@ -426,10 +430,11 @@
                 return csize;
             }
         }
     }
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class RadioButtonIcon implements Icon, UIResource, Serializable
     {
         public void paintIcon(Component c, Graphics g, int x, int y) {
             AbstractButton b = (AbstractButton) c;
             ButtonModel model = b.getModel();

@@ -540,10 +545,11 @@
             }
         }
     } // end class RadioButtonIcon
 
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class CheckBoxMenuItemIcon implements Icon, UIResource, Serializable
     {
         public void paintIcon(Component c, Graphics g, int x, int y) {
             AbstractButton b = (AbstractButton) c;
             ButtonModel model = b.getModel();

@@ -565,10 +571,11 @@
         public int getIconHeight() { return 9; }
 
     } // End class CheckBoxMenuItemIcon
 
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class RadioButtonMenuItemIcon implements Icon, UIResource, Serializable
     {
         public void paintIcon(Component c, Graphics g, int x, int y) {
             AbstractButton b = (AbstractButton) c;
             ButtonModel model = b.getModel();

@@ -581,10 +588,11 @@
         public int getIconHeight() { return 12; }
 
     } // End class RadioButtonMenuItemIcon
 
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class MenuItemCheckIcon implements Icon, UIResource, Serializable{
         public void paintIcon(Component c, Graphics g, int x, int y) {
             /* For debugging:
                Color oldColor = g.getColor();
             g.setColor(Color.orange);

@@ -595,10 +603,11 @@
         public int getIconWidth() { return 9; }
         public int getIconHeight() { return 9; }
 
     } // End class MenuItemCheckIcon
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class MenuItemArrowIcon implements Icon, UIResource, Serializable {
         public void paintIcon(Component c, Graphics g, int x, int y) {
             /* For debugging:
             Color oldColor = g.getColor();
             g.setColor(Color.green);

@@ -609,10 +618,11 @@
         public int getIconWidth() { return 4; }
         public int getIconHeight() { return 8; }
 
     } // End class MenuItemArrowIcon
 
+    @SuppressWarnings("serial") // Same-version serialization only
     private static class MenuArrowIcon implements Icon, UIResource, Serializable {
         public void paintIcon(Component c, Graphics g, int x, int y) {
             if (WindowsMenuItemUI.isVistaPainting()) {
                 XPStyle xp = XPStyle.getXP();
                 State state = State.NORMAL;

@@ -720,10 +730,11 @@
         /**
          * CheckIcon for JMenuItem, JMenu, JCheckBoxMenuItem and
          * JRadioButtonMenuItem.
          * Note: to be used on Vista only.
          */
+        @SuppressWarnings("serial") // Same-version serialization only
         private static class VistaMenuItemCheckIcon
               implements Icon, UIResource, Serializable {
 
             private final JMenuItem menuItem;
             private final Class<? extends JMenuItem> type;