Examples of DtSpace


Examples of org.foray.fotree.value.DtSpace

     * Returns the precedence component of this property.
     * @return The precedence component.
     */
    public int getPrecedence() {
        if (value() instanceof DtSpace) {
            final DtSpace spaceDT = (DtSpace) value();
            return spaceDT.getPrecedence();
        }
        return getPrecedenceNoInstance();
    }
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

            final String propertyFullName, final String attributeValue)
            throws PropertyException {
        if (! (value() instanceof DtSpace)) {
            return false;
        }
        DtSpace spaceDT = (DtSpace) value();
        final String subPropertyName = Property.getSubPropertyName(
                propertyFullName);
        spaceDT = createOrAddSpace(spaceDT, fobj, attributeValue,
                subPropertyName, propertyFullName);
        return true;
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

    private DtSpace createOrAddSpace(final DtSpace inputSpaceDT,
            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 boolean componentAdded = spaceDT.addComponent(subPropertyName,
                value);
        if (! componentAdded) {
            throw unexpectedValue(value, fobj);
        }
        return spaceDT;
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

     */
    private PropertyValue createPropertyValueSpace(
            final FObj fobj, final String value,
            final String subPropertyName, final String propertyFullName)
            throws PropertyException {
        final DtSpace spaceDT = createOrAddSpace(null, fobj, value,
                subPropertyName, propertyFullName);
        if (spaceDT != null) {
            return spaceDT;
        }
        throw unexpectedValue(value, fobj);
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

            } else {
                return (int) Math.round(value().evalNumeric() * fontSize);
            }
        }
        if (value() instanceof DtSpace) {
            final DtSpace space = (DtSpace) value();
            switch (rangeID) {
            case MINIMUM: {
                return space.getLengthMinimum(fobj.traitFontSize(context));
            }
            case OPTIMUM: {
                return space.getLengthOptimum(fobj.traitFontSize(context));
            }
            case MAXIMUM: {
                return space.getLengthMaximum(fobj.traitFontSize(context));
            }
            }
        }
        throw this.unexpectedRetrieval();
    }
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

     * @param fobj The FO for which this value is needed.
     * @return The precedence component.
     */
    public int getPrecedence(final FoContext context, final FObj fobj) {
        if (value() instanceof DtSpace) {
            final DtSpace space = (DtSpace) value();
            return space.getPrecedence();
        }
        return getPrecedenceNoInstance(context, fobj);
    }
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

     * @return The conditionality component.
     */
    public Conditionality getConditionality(final FoContext context,
            final FObj fobj) {
        if (value() instanceof DtSpace) {
            final DtSpace space = (DtSpace) value();
            return space.getConditionality();
        }
        return getConditionalityNoInstance(context, fobj);
    }
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

            final String propertyFullName, final String attributeValue)
            throws PropertyException {
        if (! (value() instanceof DtSpace)) {
            return false;
        }
        DtSpace spaceDT = (DtSpace) value();
        final String subPropertyName = Property.getSubPropertyName(
                propertyFullName);
        spaceDT = createOrAddSpace(spaceDT, fobj, attributeValue,
                subPropertyName, propertyFullName);
        return true;
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

    private DtSpace createOrAddSpace(final DtSpace inputSpaceDT,
            final FObj fobj,
            final String value, final String subPropertyName,
            final String propertyFullName)
            throws PropertyException {
        DtSpace spaceDT = inputSpaceDT;
        if (spaceDT == null) {
            spaceDT = new DtSpace(null, null, null, FoValue.RETAIN,
                    new DtInteger(DtSpace.PRECEDENCE_FORCE));
        }
        final boolean componentAdded = spaceDT.addComponent(subPropertyName,
                value);
        if (! componentAdded) {
            throw unexpectedValue(value, fobj);
        }
        return spaceDT;
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

     */
    private PropertyValue createPropertyValueSpace(
            final FObj fobj,
            final String value, final String subPropertyName,
            final String propertyFullName) throws PropertyException {
        final DtSpace spaceDT = createOrAddSpace(null, fobj, value,
                subPropertyName, propertyFullName);
        if (spaceDT != null) {
            return spaceDT;
        }
        throw unexpectedValue(value, fobj);
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.