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 bc...@apache.org on 2004/10/18 22:11:16 UTC

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

bckfnn      2004/10/18 13:11:16

  Modified:    src/java/org/apache/fop/datatypes Numeric.java
               src/java/org/apache/fop/fo/properties NumberProperty.java
  Log:
  Added convenience method getValue() that returns the value as an int.
  
  Revision  Changes    Path
  1.4       +8 -2      xml-fop/src/java/org/apache/fop/datatypes/Numeric.java
  
  Index: Numeric.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/datatypes/Numeric.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Numeric.java	27 Feb 2004 17:42:28 -0000	1.3
  +++ Numeric.java	18 Oct 2004 20:11:16 -0000	1.4
  @@ -54,7 +54,13 @@
        * @return true when the numeric is absolute.
        */
       boolean isAbsolute();
  -    
  +
  +    /**
  +     * Returns the value of this numeric as an int.
  +     * @return the value as an integer.
  +     */
  +    public int getValue();
  +
       /**
        * Return the resolved value. This method will becalled during evaluation 
        * of the expression tree and relative numerics can then return a 
  
  
  
  1.5       +5 -1      xml-fop/src/java/org/apache/fop/fo/properties/NumberProperty.java
  
  Index: NumberProperty.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/fo/properties/NumberProperty.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- NumberProperty.java	27 Feb 2004 17:45:45 -0000	1.4
  +++ NumberProperty.java	18 Oct 2004 20:11:16 -0000	1.5
  @@ -101,6 +101,10 @@
           return number.doubleValue();
       }
   
  +    public int getValue() {
  +    	return number.intValue();
  +    }
  +
       /**
        * Return true because all numbers are absolute.
        * @return true.
  
  
  

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