Examples of DtLength


Examples of org.foray.fotree.value.DtLength

                    - getCurrentUnitLength();
            final String valuePart = getCurrentTokenValue().substring(0,
                    numLen);
            final String unitPart = getCurrentTokenValue().substring(numLen);
            final float value = Float.parseFloat(valuePart);
            prop = new DtLength(value, unitPart);
            break;

        case TOK_COLORSPEC:
            try {
                prop = DtColor.parseColorDescription(getCurrentTokenValue());
View Full Code Here

Examples of org.foray.fotree.value.DtLength

            final FObj fobj,
            final String value, final String subPropertyName,
            final String propertyFullName) throws PropertyException {
        DtSpace spaceDT = inputSpaceDT;
        if (spaceDT == null) {
            final DtLength length = DtLength.makeLengthDT("0pt");
            spaceDT = new DtSpace(length, length, length,
                    FoValue.DISCARD, new DtInteger(0));
        }
        final PropertyValue pv = this.standardParse(fobj, value, null);
        if (pv.canEvalLength()) {
View Full Code Here

Examples of org.foray.fotree.value.DtLength

            final FObj fobj, final String value,
            final String subPropertyName, final String propertyFullName)
            throws PropertyException {
        DtLengthRange lengthRange = inputLengthRange;
        if (lengthRange == null) {
            final DtLength lengthMin = DtLength.ZERO_LENGTH;
            final DtLength lengthOpt = PdLeaderLength.DEFAULT_OPTIMUM_COMPONENT;
            final DtPercentage lengthMax =
                    PdLeaderLength.DEFAULT_MAXIMUM_COMPONENT;
            lengthRange = new DtLengthRange(true, lengthMin, lengthOpt,
                    lengthMax);
        }
View Full Code Here

Examples of org.foray.fotree.value.DtLength

        final DtLengthRange lr = (DtLengthRange) value();
        final PropertyValue pv = standardParse(fobj, attributeValue);
        if (! (pv instanceof DtLength)) {
            throw unexpectedValue(attributeValue, fobj);
        }
        final DtLength length = (DtLength) pv;
        final String subPropertyName = getSubPropertyName(propertyFullName);
        final boolean componentAdded = lr.setComponent(subPropertyName, length);
        if (! componentAdded) {
            throw Property.invalidPropertyName(propertyFullName);
        }
View Full Code Here

Examples of org.foray.fotree.value.DtLength

            return FoProperty.FONT_SIZE;
        }
        if (Property.keywordInSet(keyword, PdFontFamily.VALID_KEYWORDS)) {
            return FoProperty.FONT_FAMILY;
        }
        final DtLength length = DtLength.makeLengthDT(input);
        if (length != null) {
            return FoProperty.FONT_SIZE;
        }
        final DtPercentage percentage = DtPercentage.makePercentageDT(input);
        if (percentage != null) {
View Full Code Here

Examples of org.foray.fotree.value.DtLength

            throw unexpectedValue(value, fobj);
        }
        final PropertyCollection collection = new PropertyCollection();
        while (st.hasMoreTokens()) {
            final String token = st.nextToken();
            final DtLength length = DtLength.makeLengthDT(token);
            if (length == null) {
                throw unexpectedValue(value, fobj);
            }
            final PdSize insideSize = new PdSize(length);
            collection.addItem(insideSize);
View Full Code Here

Examples of org.foray.fotree.value.DtLength

                    index = 0;
                }
            }
            final Property property = collection.getItem(index);
            final PropertyValue pv = property.value();
            final DtLength length = (DtLength) pv;
            return length.getValue(fobj.traitFontSize(context));
        }
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            /* We really don't know what to do with these keyword values, so
View Full Code Here

Examples of org.foray.fotree.value.DtLength

            final String value, final String subPropertyName,
            final String propertyFullName)
            throws PropertyException {
        DtSpace spaceDT = inputSpaceDT;
        if (spaceDT == null) {
            final DtLength length = DtLength.makeLengthDT("0pt");
            spaceDT = new DtSpace(length, length, length,
                    FoValue.DISCARD, new DtInteger(0));
        }
        final boolean componentAdded = spaceDT.addComponent(subPropertyName,
                value);
View Full Code Here

Examples of org.foray.fotree.value.DtLength

                if (! isOuterEdge(context, fobj)) {
                    return 0;
                }
            }
            /* In all other cases, return the length*/
            final DtLength length = lengthConditional.getLength();
            final int lengthValue = length.getValue(fobj.traitFontSize(
                    context));
            return Math.max(lengthValue, 0);
        }
        throw this.unexpectedRetrieval();
    }
View Full Code Here

Examples of org.foray.fotree.value.DtLength

                if (! isOuterEdge(context, fobj)) {
                    return 0;
                }
            }
            /* In all other cases, return the length*/
            final DtLength length = lengthConditional.getLength();
            final int lengthValue = length.getValue(fobj.traitFontSize(
                    context));
            return Math.max(lengthValue, 0);
        }
        throw this.unexpectedRetrieval();
    }
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.