]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Convenience method for checking "auto" enum value on a property. Makes code more...
authorJeremias Maerki <jeremias@apache.org>
Fri, 18 Mar 2005 08:11:48 +0000 (08:11 +0000)
committerJeremias Maerki <jeremias@apache.org>
Fri, 18 Mar 2005 08:11:48 +0000 (08:11 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198506 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fo/properties/Property.java

index 555b9ea3ce0525a5c1adbd39451a35edd1228e9f..3d4dbe65db2c3db0bc997a90e651db64b2c9759e 100644 (file)
@@ -25,6 +25,7 @@ import org.apache.commons.logging.LogFactory;
 
 import org.apache.fop.datatypes.Length;
 import org.apache.fop.datatypes.Numeric;
+import org.apache.fop.fo.Constants;
 
 /**
  * Base class for all property objects
@@ -126,6 +127,11 @@ public class Property {
         return 0;
     }
 
+    /** @return true if the property is an enum and has value 'auto' */
+    public boolean isAuto() {
+        return (getEnum() == Constants.EN_AUTO);
+    }
+    
     /**
      * This method expects to be overridden by subclasses
      * @return char property value