You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/08/21 15:00:36 UTC

svn commit: r234197 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java

Author: jeremias
Date: Sun Aug 21 06:00:32 2005
New Revision: 234197

URL: http://svn.apache.org/viewcvs?rev=234197&view=rev
Log:
New hasTrait() method.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java?rev=234197&r1=234196&r2=234197&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/area/Area.java Sun Aug 21 06:00:32 2005
@@ -120,7 +120,9 @@
     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 @@
     }
     
     /**
+     * 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 @@
         }
     }
     
+    /** @see java.lang.Object#toString() */
     public String toString() {
         StringBuffer sb = new StringBuffer(super.toString());
         sb.append(" {ipd=").append(Integer.toString(getIPD()));



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org