Examples of DtLengthConditional


Examples of org.foray.fotree.value.DtLengthConditional

                    context);
            return Math.max(length, 0);
        }
        if (value() instanceof DtLengthConditional
                && direction.isRelative()) {
            final DtLengthConditional lengthConditional
                    = (DtLengthConditional) value();
            /*
             * TODO: I'm not sure we have enough information here yet. We may
             * need to know the writing mode of the reference-area. If so,
             * add it to the parameters of the method.
             */
            final FoValue condition = lengthConditional.getConditionality();
            /* If the condition is discard and this is *not* the outer edge,
             * then the border should have a width of zero.
             */
            if (condition == FoValue.DISCARD) {
                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.DtLengthConditional

            /* TODO: This base is probably not quite right. */
            final int base = context.ipdAncestorBlockOrRa();
            return Math.round(value().evalPercentage() * base);
        }
        if (value() instanceof DtLengthConditional) {
            final DtLengthConditional lengthConditional
                    = (DtLengthConditional) value();
            /*
             * TODO: I'm not sure we have enough information here yet. We may
             * need to know the writing mode of the reference-area. If so,
             * add it to the parameters of the method.
             */
            final FoValue condition = lengthConditional.getConditionality();
            /* If the condition is discard and this is *not* the outer edge,
             * then the padding should be zero.
             */
            if (condition == FoValue.DISCARD) {
                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.