diff options
author | Jeremias Maerki <jeremias@apache.org> | 2010-12-13 14:49:56 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2010-12-13 14:49:56 +0000 |
commit | ce6d9e1eeef5f7b17fada9f07145e7e430586bf1 (patch) | |
tree | 1cf77ef1eee183895d06be19c30628b5a79cbefb /src/java/org/apache/fop/fo | |
parent | ad93316e324520818ebfd4f4e02644f681c31812 (diff) | |
download | xmlgraphics-fop-ce6d9e1eeef5f7b17fada9f07145e7e430586bf1.tar.gz xmlgraphics-fop-ce6d9e1eeef5f7b17fada9f07145e7e430586bf1.zip |
Adjust to changes in XML Graphics Commons:
- equals() to ColorUtil.isSameColor()
- ICCColorSpaceExt to ICCColorSpaceWithIntent
- int to RenderingIntent enum
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Color@1045155 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo')
-rw-r--r-- | src/java/org/apache/fop/fo/properties/ColorProperty.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/properties/ColorProperty.java b/src/java/org/apache/fop/fo/properties/ColorProperty.java index 925d275af..4bbf94b74 100644 --- a/src/java/org/apache/fop/fo/properties/ColorProperty.java +++ b/src/java/org/apache/fop/fo/properties/ColorProperty.java @@ -69,6 +69,7 @@ public final class ColorProperty extends Property { * @throws PropertyException * for invalid or inconsistent FO input */ + @Override public Property convertProperty(Property p, PropertyList propertyList, FObj fo) throws PropertyException { @@ -118,11 +119,13 @@ public final class ColorProperty extends Property { * @param foUserAgent FOP user agent * @return float the AWT color represented by this ColorType instance */ + @Override public Color getColor(FOUserAgent foUserAgent) { return color; } /** {@inheritDoc} */ + @Override public String toString() { return ColorUtil.colorToString(color); } @@ -138,23 +141,27 @@ public final class ColorProperty extends Property { /** * @return this.colorType cast as an Object */ + @Override public Object getObject() { return this; } /** {@inheritDoc} */ + @Override public boolean equals(Object o) { if (this == o) { return true; } if (o instanceof ColorProperty) { - return ((ColorProperty) o).color.equals(this.color); + return org.apache.xmlgraphics.java2d.color.ColorUtil.isSameColor( + ((ColorProperty) o).color, this.color); } return false; } /** {@inheritDoc} */ + @Override public int hashCode() { return this.color.hashCode(); } |