src/share/classes/javax/swing/plaf/nimbus/DerivedColor.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 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

@@ -36,10 +36,11 @@
  * value will update to reflect the new derived color. Property change events
  * are fired for the "rgb" property when the derived color changes.
  *
  * @author Jasper Potts
  */
+@SuppressWarnings("serial") // Same-version serialization only
 class DerivedColor extends Color {
     private final String uiDefaultParentName;
     private final float hOffset, sOffset, bOffset;
     private final int aOffset;
     private int argbValue;

@@ -171,10 +172,11 @@
                 " offsets=" + getHueOffset() + "," + getSaturationOffset() + ","
                 + getBrightnessOffset() + "," + getAlphaOffset();
         return src == null ? s : s + " pColor=" + src.getRed() + "," + src.getGreen() + "," + src.getBlue();
     }
 
+    @SuppressWarnings("serial") // Same-version serialization only
     static class UIResource extends DerivedColor implements javax.swing.plaf.UIResource {
         UIResource(String uiDefaultParentName, float hOffset, float sOffset,
                    float bOffset, int aOffset) {
             super(uiDefaultParentName, hOffset, sOffset, bOffset, aOffset);
         }