Examples of DtSpace


Examples of org.foray.fotree.value.DtSpace

     * @return The value of the numeric component of this property.
     */
    public int getValue(final FoContext context, final LengthRange subProperty,
            final FObj fobj) {
        if (value() instanceof DtSpace) {
            final DtSpace spaceDT = (DtSpace) value();
            switch (subProperty) {
            case MINIMUM: {
                return spaceDT.getLengthMinimum(fobj.traitFontSize(context));
            }
            case OPTIMUM: {
                return spaceDT.getLengthOptimum(fobj.traitFontSize(context));
            }
            case MAXIMUM: {
                return spaceDT.getLengthMaximum(fobj.traitFontSize(context));
            }
            default: {
                return 0;
            }
            }
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

     * Returns the value of the conditionality component of this property.
     * @return The value of the conditionality component of this property.
     */
    public Conditionality getConditionality() {
        if (value() instanceof DtSpace) {
            final DtSpace spaceDT = (DtSpace) value();
            return spaceDT.getConditionality();
        }
        return getConditionalityNoInstance();
    }
View Full Code Here

Examples of org.foray.fotree.value.DtSpace

     * Returns the value of the precedence component of this property.
     * @return The value of the precedence component of this property.
     */
    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
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.