diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-08-21 13:00:32 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-08-21 13:00:32 +0000 |
commit | 046d2a92ed471f56a4b38df1e8c3bb77474dc7c4 (patch) | |
tree | 0c2a88445bc634f5daa73a55fcc039e3ae68c842 /src/java/org | |
parent | 415a83f5674a17bcbb74e968fe80434fd015f16a (diff) | |
download | xmlgraphics-fop-046d2a92ed471f56a4b38df1e8c3bb77474dc7c4.tar.gz xmlgraphics-fop-046d2a92ed471f56a4b38df1e8c3bb77474dc7c4.zip |
New hasTrait() method.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@234197 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r-- | src/java/org/apache/fop/area/Area.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/area/Area.java b/src/java/org/apache/fop/area/Area.java index da00665d2..5ce94de92 100644 --- a/src/java/org/apache/fop/area/Area.java +++ b/src/java/org/apache/fop/area/Area.java @@ -120,7 +120,9 @@ public class Area implements Serializable { public static final int CLASS_MAX = CLASS_SIDE_FLOAT + 1; private int areaClass = CLASS_NORMAL; + /** the area's inline-progression-dimension */ protected int ipd; + /** the area's block-progression-dimension */ protected int bpd; /** @@ -358,6 +360,15 @@ public class Area implements Serializable { } /** + * Checks whether a certain trait is set on this area. + * @param oTraitCode the trait key + * @return true if the trait is set + */ + public boolean hasTrait(Object oTraitCode) { + return (getTrait(oTraitCode) != null); + } + + /** * Get a boolean trait from this area. * @param oTraitCode the trait key * @return the trait value @@ -388,6 +399,7 @@ public class Area implements Serializable { } } + /** @see java.lang.Object#toString() */ public String toString() { StringBuffer sb = new StringBuffer(super.toString()); sb.append(" {ipd=").append(Integer.toString(getIPD())); |