diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-04 13:57:57 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-07-04 13:57:57 +0000 |
commit | 204ed6d4a33e1d3bf1f515c70dc2bd06e9898027 (patch) | |
tree | 33a345d541006ef1961b9852749170e4f778f8e9 /src/java/org/apache/fop/area | |
parent | f46fc609adc8313f01288205330c9a9e53e75a14 (diff) | |
download | xmlgraphics-fop-204ed6d4a33e1d3bf1f515c70dc2bd06e9898027.tar.gz xmlgraphics-fop-204ed6d4a33e1d3bf1f515c70dc2bd06e9898027.zip |
* Some minor optimizations in AbstractRenderer.
* Renamed getBooleanTrait() to getTraitAsBoolean() in Area.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@674056 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area')
-rw-r--r-- | src/java/org/apache/fop/area/Area.java | 3 | ||||
-rw-r--r-- | src/java/org/apache/fop/area/inline/InlineArea.java | 8 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/area/Area.java b/src/java/org/apache/fop/area/Area.java index ff9f5c7d0..d656b7b7d 100644 --- a/src/java/org/apache/fop/area/Area.java +++ b/src/java/org/apache/fop/area/Area.java @@ -415,10 +415,11 @@ public class Area extends AreaTreeObject implements Serializable { /** * Get a boolean trait from this area. + * * @param oTraitCode the trait key * @return the trait value */ - public boolean getBooleanTrait(Object oTraitCode) { + public boolean getTraitAsBoolean(Object oTraitCode) { final Object obj = getTrait(oTraitCode); if (obj instanceof Boolean) { return ((Boolean)obj).booleanValue(); diff --git a/src/java/org/apache/fop/area/inline/InlineArea.java b/src/java/org/apache/fop/area/inline/InlineArea.java index 0655cabe4..10ea4e304 100644 --- a/src/java/org/apache/fop/area/inline/InlineArea.java +++ b/src/java/org/apache/fop/area/inline/InlineArea.java @@ -182,22 +182,22 @@ public class InlineArea extends Area { *@return true if the inline area is underlined. */ public boolean hasUnderline() { - return getBooleanTrait(Trait.UNDERLINE); + return getTraitAsBoolean(Trait.UNDERLINE); } /** @return true if the inline area is overlined. */ public boolean hasOverline() { - return getBooleanTrait(Trait.OVERLINE); + return getTraitAsBoolean(Trait.OVERLINE); } /** @return true if the inline area has a line through. */ public boolean hasLineThrough() { - return getBooleanTrait(Trait.LINETHROUGH); + return getTraitAsBoolean(Trait.LINETHROUGH); } /** @return true if the inline area is blinking. */ public boolean isBlinking() { - return getBooleanTrait(Trait.BLINK); + return getTraitAsBoolean(Trait.BLINK); } /** |