aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/properties
diff options
context:
space:
mode:
Diffstat (limited to 'src/java/org/apache/fop/fo/properties')
-rw-r--r--src/java/org/apache/fop/fo/properties/ColorProperty.java9
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();
}