Examples of Numeric


Examples of booton.css.value.Numeric

     * @param size
     * @param unit
     * @return
     */
    public Box size(double size, Unit unit) {
        return size(new Numeric(size, unit));
    }
View Full Code Here

Examples of cc.redberry.core.number.Numeric

        try {
            return new Rational(new BigInteger(expression));
        } catch (NumberFormatException exception) {
        }
        try {
            return new Numeric(Double.parseDouble(expression));
        } catch (NumberFormatException exception) {
            return null;
        }
    }
View Full Code Here

Examples of cc.redberry.core.number.Numeric

        try {
            return new Rational(new BigInteger(expression));
        } catch (NumberFormatException exception) {
        }
        try {
            return new Numeric(Double.parseDouble(expression));
        } catch (NumberFormatException exception) {
            return null;
        }
    }
View Full Code Here

Examples of com.addthis.bundle.value.Numeric

    /**
     * return number if it's already one.  if not guess double or
     * long based on the presence of "." in string version and parse.
     */
    public static Numeric asNumberOrParse(ValueObject v) {
        Numeric n = asNumber(v);
        if (n == null && v != null) {
            String sv = v.toString();
            if (sv.indexOf(".") > 0) {
                return ValueFactory.create(Double.parseDouble(v.toString()));
            } else {
View Full Code Here

Examples of jsx.style.value.Numeric

     * @param size
     * @param unit
     * @return
     */
    public BoxLength right(double size, Unit unit) {
        return right(new Numeric(size, unit));
    }
View Full Code Here

Examples of org.apache.fop.datatypes.Numeric

     * @see SpaceProperty.Maker#convertProperty(Property, PropertyList, FObj)
     */
    public Property convertProperty(Property p,
            PropertyList propertyList,
            FObj fo) throws PropertyException {
        Numeric numval = p.getNumeric();
        if (numval != null && numval.getDimension() == 0) {
            p = new PercentLength(numval.getNumericValue(), getPercentBase(propertyList));
            Property spaceProp = super.convertProperty(p, propertyList, fo);
            spaceProp.setSpecifiedValue(String.valueOf(numval.getNumericValue()));
            return spaceProp;
        }
        return super.convertProperty(p, propertyList, fo);
    }
View Full Code Here

Examples of org.apache.fop.datatypes.Numeric

     * @return the absolute value of the input
     * @throws PropertyException for non-numeric input
     */
    public Property eval(Property[] args,
                         PropertyInfo propInfo) throws PropertyException {
        Numeric num = args[0].getNumeric();
        if (num == null) {
            throw new PropertyException("Non numeric operand to abs function");
        }
        // TODO: What if it has relative components (percent, table-col units)?
        return (Property) NumericOp.abs(num);
View Full Code Here

Examples of org.apache.fop.datatypes.Numeric

     * @return the minimum of the two args elements passed
     * @throws PropertyException for invalid operands
     */
    public Property eval(Property[] args,
                         PropertyInfo pInfo) throws PropertyException {
        Numeric n1 = args[0].getNumeric();
        Numeric n2 = args[1].getNumeric();
        if (n1 == null || n2 == null) {
            throw new PropertyException("Non numeric operands to min function");
        }
        return (Property) NumericOp.min(n1, n2);
       }
View Full Code Here

Examples of org.apache.fop.datatypes.Numeric

     * @return numeric object containing the calculated body-start value
     * @throws PropertyException if called from outside of an fo:list-item
     */
    public Property eval(Property[] args,
                         PropertyInfo pInfo) throws PropertyException {
        Numeric distance =
            pInfo.getPropertyList().get(Constants.PR_PROVISIONAL_DISTANCE_BETWEEN_STARTS).getNumeric();

        PropertyList pList = pInfo.getPropertyList();
        while (pList != null && !(pList.getFObj() instanceof ListItem)) {
            pList = pList.getParentPropertyList();
        }
        if (pList == null) {
            throw new PropertyException("body-start() called from outside an fo:list-item");
        }

        Numeric startIndent = pList.get(Constants.PR_START_INDENT).getNumeric();

        return (Property) NumericOp.addition(distance, startIndent);
    }
View Full Code Here

Examples of org.apache.fop.datatypes.Numeric

        LengthBase base = new LengthBase(pInfo.getPropertyList(),
                                         LengthBase.CONTAINING_REFAREA_WIDTH);
        PercentLength refWidth = new PercentLength(1.0, base);

        Numeric labelEnd = distance;
        labelEnd = NumericOp.addition(labelEnd, startIndent);
        //TODO add start-intrusion-adjustment
        labelEnd = NumericOp.subtraction(labelEnd, separation);
       
        labelEnd = NumericOp.subtraction(refWidth, labelEnd);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.