diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2008-07-25 10:55:49 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2008-07-25 10:55:49 +0000 |
commit | d058e870151a49af34ec1e7204edd0ffc64aaefc (patch) | |
tree | 14c346af79c0d2207f98b17e1e9f0212c8c32f44 /src/java/org/apache/fop/traits/BorderProps.java | |
parent | cc5d6604bde87fca098633ceccd66fc92808bddc (diff) | |
download | xmlgraphics-fop-d058e870151a49af34ec1e7204edd0ffc64aaefc.tar.gz xmlgraphics-fop-d058e870151a49af34ec1e7204edd0ffc64aaefc.zip |
Merged revisions 679052-679352 via svnmerge from
https://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r679060 | acumiskey | 2008-07-23 11:39:11 +0100 (Wed, 23 Jul 2008) | 2 lines
My bad.. copy paste error I introduced which broke forrest.
........
r679164 | jeremias | 2008-07-23 20:33:24 +0100 (Wed, 23 Jul 2008) | 1 line
Only update the generated files if any source file is newer than the generated ones.
........
r679326 | vhennebert | 2008-07-24 10:35:34 +0100 (Thu, 24 Jul 2008) | 2 lines
Fed up with all those trailing whitespaces. Let's remove them all (once... and for all?)
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@679758 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/traits/BorderProps.java')
-rw-r--r-- | src/java/org/apache/fop/traits/BorderProps.java | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/traits/BorderProps.java b/src/java/org/apache/fop/traits/BorderProps.java index d00bdb09d..20e362674 100644 --- a/src/java/org/apache/fop/traits/BorderProps.java +++ b/src/java/org/apache/fop/traits/BorderProps.java @@ -5,9 +5,9 @@ * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -16,7 +16,7 @@ */ /* $Id$ */ - + package org.apache.fop.traits; import java.awt.Color; @@ -33,14 +33,14 @@ import org.apache.fop.util.ColorUtil; * Class to store border trait propties for the area tree. */ public class BorderProps implements Serializable { - + /** Separate border model */ public static final int SEPARATE = 0; /** Collapsing border model, for borders inside a table */ public static final int COLLAPSE_INNER = 1; /** Collapsing border model, for borders at the table's outer border */ public static final int COLLAPSE_OUTER = 2; - + /** Border style (one of EN_*) */ public int style; // Enum for border style /** Border color */ @@ -86,7 +86,7 @@ public class BorderProps implements Serializable { return 0; } } - + private String getStyleString() { switch (style) { case Constants.EN_NONE: return "none"; @@ -102,7 +102,7 @@ public class BorderProps implements Serializable { default: throw new IllegalStateException("Illegal border style: " + style); } } - + private static int getConstantForStyle(String style) { if ("none".equalsIgnoreCase(style)) { return Constants.EN_NONE; @@ -128,7 +128,7 @@ public class BorderProps implements Serializable { throw new IllegalStateException("Illegal border style: " + style); } } - + /** {@inheritDoc} */ public int hashCode() { return toString().hashCode(); @@ -144,7 +144,7 @@ public class BorderProps implements Serializable { if (obj instanceof BorderProps) { BorderProps other = (BorderProps)obj; return (style == other.style) - && color.equals(other.color) + && color.equals(other.color) && width == other.width && mode == other.mode; } @@ -153,7 +153,7 @@ public class BorderProps implements Serializable { } /** - * Returns a BorderProps represtation of a string of the format as written by + * Returns a BorderProps represtation of a string of the format as written by * BorderProps.toString(). * @param foUserAgent FOP user agent caching ICC profiles * @param s the string @@ -180,8 +180,8 @@ public class BorderProps implements Serializable { c = ColorUtil.parseColorString(foUserAgent, color); } catch (PropertyException e) { throw new IllegalArgumentException(e.getMessage()); - } - + } + return new BorderProps(style, width, c, mode); } else { throw new IllegalArgumentException("BorderProps must be surrounded by parentheses"); |