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 pb...@apache.org on 2002/06/09 12:39:11 UTC

cvs commit: xml-fop/src/org/apache/fop/datatypes Numeric.java

pbwest      2002/06/09 03:39:11

  Modified:    src/org/apache/fop/datatypes Tag: FOP_0-20-0_Alt-Design
                        Numeric.java
  Log:
  Added isDistance()
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.2   +15 -3     xml-fop/src/org/apache/fop/datatypes/Attic/Numeric.java
  
  Index: Numeric.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/datatypes/Attic/Numeric.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- Numeric.java	7 May 2002 16:06:36 -0000	1.1.2.1
  +++ Numeric.java	9 Jun 2002 10:39:11 -0000	1.1.2.2
  @@ -1,11 +1,11 @@
   /*
  - * $Id: Numeric.java,v 1.1.2.1 2002/05/07 16:06:36 pbwest Exp $
  + * $Id: Numeric.java,v 1.1.2.2 2002/06/09 10:39:11 pbwest Exp $
    *
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
    * @author <a href="mailto:pbwest@powerup.com.au">Peter B. West</a>
  - * @version $Revision: 1.1.2.1 $ $Name:  $
  + * @version $Revision: 1.1.2.2 $ $Name:  $
    */
   
   package org.apache.fop.datatypes;
  @@ -131,6 +131,11 @@
       public static final int NOT_NUMBER = UNIT | REL_LENGTH;
   
       /**
  +     * Integer constants for distances.
  +     */
  +    public static final int DISTANCE = MILLIPOINTS | REL_LENGTH;
  +
  +    /**
        * The numerical contents of this instance.
        */
       protected double value;
  @@ -399,6 +404,13 @@
       }
   
       /**
  +     * This object is a distance; a absolute or relative length
  +     */
  +    public boolean isDistance() {
  +        return (baseunit & DISTANCE) != 0;
  +    }
  +
  +    /**
        * This object is a time in milliseconds.
        */
       public boolean isTime() {
  @@ -905,7 +917,7 @@
       }
   
       /**
  -     * @param unit an <tt>int</tt> encoding a <i>Time</i> unit.
  +     * @param unit an <tt>int</tt> encoding a unit.
        * @return the <tt>String</tt> name of the unit.
        */
       public static String getUnitName(int unit) {
  
  
  

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