xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r1045096 - /xmlgraphics/commons/branches/Temp_Color/src/java/org/apache/xmlgraphics/java2d/color/ColorWithAlternatives.java
Date Mon, 13 Dec 2010 12:43:23 GMT
Author: jeremias
Date: Mon Dec 13 12:43:23 2010
New Revision: 1045096

URL: http://svn.apache.org/viewvc?rev=1045096&view=rev
Log:
Javadoc update.

Modified:
    xmlgraphics/commons/branches/Temp_Color/src/java/org/apache/xmlgraphics/java2d/color/ColorWithAlternatives.java

Modified: xmlgraphics/commons/branches/Temp_Color/src/java/org/apache/xmlgraphics/java2d/color/ColorWithAlternatives.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/branches/Temp_Color/src/java/org/apache/xmlgraphics/java2d/color/ColorWithAlternatives.java?rev=1045096&r1=1045095&r2=1045096&view=diff
==============================================================================
--- xmlgraphics/commons/branches/Temp_Color/src/java/org/apache/xmlgraphics/java2d/color/ColorWithAlternatives.java
(original)
+++ xmlgraphics/commons/branches/Temp_Color/src/java/org/apache/xmlgraphics/java2d/color/ColorWithAlternatives.java
Mon Dec 13 12:43:23 2010
@@ -27,11 +27,14 @@ import java.awt.color.ColorSpace;
  * The alternative colors shall be the ones that are preferred if an output format supports
them.
  * This is normally used for passing device-specific colors through to the output format.
  * <p>
- * An additional benefit of this class is a better {@link ColorWithAlternatives#equals(Object)}
- * method than the one from {@link Color} which only takes the sRGB values into account.
- * <p>
  * This class only adds a single reference to a color array which should not increase memory
  * consumption by much if no alternative colors are specified.
+ * <p>
+ * <b>Important:</b> Due to a flaw in {@link Color#equals(Object)}, the <code>equals()</code>
+ * method should not be used to compare two colors, especially when used to update the current
+ * color for some output format. {@link Color} only takes the sRGB values into account but
not
+ * more the advanced facets of this class. Use {@link ColorUtil#isSameColor(Color, Color)}
for
+ * such a check.
  */
 public class ColorWithAlternatives extends Color {
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message