Examples of canEvalPercentage()


Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

            final String value) throws PropertyException {
        final PropertyValue pv = standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalPercentage()) {
            return pv;
        }
        if (pv.canEvalNumeric()) {
            final double number = pv.evalNumeric();
            if (pv.getUnitPower() == Expr.UNIT_POWER_NUMERIC
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

            final String value) throws PropertyException {
        final PropertyValue pv = standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalPercentage()) {
            return pv;
        }
        if (pv.canEvalLength()) {
            return pv;
        }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

        final PropertyValue pv = this.standardParse(fobj, token,
                AbstractAllowedAxisScale.VALID_TOKEN_KEYWORDS);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalPercentage()) {
            return pv;
        }
        throw unexpectedValue(token, fobj);
    }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

        final float[] returnValue = new float[collection.getCount()];
        for (int i = 0; i < collection.getCount(); i++) {
            final PropertyValue pv = collection.getItem(i);
            if (pv.canEvalKeyword()) {
                returnValue[i] = java.lang.Float.POSITIVE_INFINITY;
            } else if (pv.canEvalPercentage()) {
                returnValue[i] = pv.evalPercentage();
            }
        }
        return returnValue;
    }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

            final String value) throws PropertyException {
        final PropertyValue pv = standardParse(fobj, value);
        if (pv.canEvalKeyword()) {
            return pv;
        }
        if (pv.canEvalPercentage()) {
            if (pv.evalPercentage() < 0) {
                throw unexpectedValue(value, fobj);
            }
            return pv;
        }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

            return pv;
        }
        if (pv.canEvalLength()) {
            return pv;
        }
        if (pv.canEvalPercentage()) {
            return pv;
        }
        if (pv instanceof DtLengthConditional) {
            return pv;
        }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

        while (st.hasMoreTokens()) {
            final String token = st.nextToken();
            final PropertyValue parsedToken = this.standardParse(fobj, value,
                    null);
            if (parsedToken.canEvalLength()
                    || parsedToken.canEvalPercentage()) {
                collection.addItem(parsedToken);
            } else {
                throw this.unexpectedValue(token, fobj);
            }
        }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

            final AbsoluteCompass direction, final FObj fobj) {
        final ValueCollection collection = (ValueCollection) value();
        final int whichElement = PropertyCollection.whichElementForDirectional(
                direction, collection.getCount());
        final PropertyValue value = collection.getItem(whichElement);
        if (value.canEvalPercentage()) {
            int base = 0;
            if (fobj instanceof SimplePageMaster) {
                final SimplePageMaster spm = (SimplePageMaster) fobj;
                base = spm.traitPageHeight();
            } else {
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

        final PropertyValue pv2 = collection.getItem(1).value();
        /* If the first item is a length or percentage, the other needs to be
         * also. */
        if (pv.canEvalPercentage()
                || pv.canEvalLength()) {
            if (pv2.canEvalPercentage()
                    || pv2.canEvalLength()) {
                return collection;
            }
            throw unexpectedValue(value, fobj);
        }
View Full Code Here

Examples of org.foray.fotree.value.PropertyValue.canEvalPercentage()

        final PdBackgroundPosition bpProperty =
            (PdBackgroundPosition) collection
                .getItem(0);
        final PropertyValue pv = bpProperty.value();
        if (collection.getCount() == 1) {
            if (pv.canEvalPercentage()
                    || pv.canEvalLength()) {
                if (axis == AbsoluteAxis.VERTICAL) {
                    return Math.round((paddingRectangleDimension
                            - backgroundImageDimension) / 2);
                }
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.