Package org.apache.fop.fo.expr

Examples of org.apache.fop.fo.expr.Numeric


    // Can't just do new Numeric(length) because it always uses
    // the constructor for Length!
    // Otherwise, must make each class know about Numeric...
    // ie, return length.asNumeric(): cleaner
    if (length instanceof PercentLength)
      return new Numeric((PercentLength)length);
    if (length instanceof TableColLength)
      return new Numeric((TableColLength)length);
    return new Numeric(length);
  }
View Full Code Here


    public String toString() {
        return (Double.toString(tcolUnits) + " table-column-units");
    }

    public Numeric asNumeric() {
  return new Numeric(this);
    }
View Full Code Here

        }
  return sbuf.toString();
    }

    public Numeric asNumeric() {
  Numeric numeric = null;
  for (Enumeration e = lengths.elements(); e.hasMoreElements();) {
      Length l = (Length)e.nextElement();
      if (numeric == null) {
    numeric = l.asNumeric();
      }
      else {
    try {
        Numeric sum = numeric.add(l.asNumeric());
        numeric = sum;
    } catch (PropertyException pe) {
        System.err.println("Can't convert MixedLength to Numeric: " +
               pe);
    }
View Full Code Here

        }
        setComputedValue((int)(dvalue * 1000));
    }

    public Numeric asNumeric() {
  return new Numeric(this);
    }
View Full Code Here

        // What about the base value?
        return (new Double(factor * 100.0).toString()) + "%";
    }

    public Numeric asNumeric() {
  return new Numeric(this);
    }
View Full Code Here

  **/

  public Object getObject() { return this.number; }

  public Numeric getNumeric() {
    return new Numeric(this.number);
  }
View Full Code Here

    // Can't just do new Numeric(length) because it always uses
    // the constructor for Length!
    // Otherwise, must make each class know about Numeric...
    // ie, return length.asNumeric(): cleaner
    if (length instanceof PercentLength)
      return new Numeric((PercentLength)length);
    if (length instanceof TableColLength)
      return new Numeric((TableColLength)length);
    return new Numeric(length);
  }
View Full Code Here

TOP

Related Classes of org.apache.fop.fo.expr.Numeric

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.