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/03/18 09:11:49 UTC

cvs commit: xml-fop/src/java/org/apache/fop/fo/properties Property.java

jeremias    2005/03/18 00:11:49

  Modified:    src/java/org/apache/fop/fo/properties Property.java
  Log:
  Convenience method for checking "auto" enum value on a property. Makes code more readable.
  
  Revision  Changes    Path
  1.8       +7 -1      xml-fop/src/java/org/apache/fop/fo/properties/Property.java
  
  Index: Property.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/Property.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- Property.java	25 Jan 2005 10:55:46 -0000	1.7
  +++ Property.java	18 Mar 2005 08:11:48 -0000	1.8
  @@ -25,6 +25,7 @@
   
   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 @@
           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
  
  
  

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