Package org.foray.fotree

Examples of org.foray.fotree.FObj


     */
    protected void validateDescendants() throws FoTreeException {
        this.validateAtLeastOneChild();
        /* The content model requires that all children be %block content. */
        for (int i = 0; i < this.getChildren().size(); i++) {
            final FObj fobj = this.getChildren().get(i);
            if (! fobj.isContentBlock()) {
                this.throwException("Child of " + getFullName()
                        + " must be %block.");
            }
        }
    }
View Full Code Here


            /* "this" has not yet been added to the children of the parent.
             * Therefore, the previous cell is the last child of the parent. */
            previousCellIndex = row.getChildCount() - 1;
        }
        if (previousCellIndex > -1) {
            final FObj previous = row.getChildAt(previousCellIndex);
            /* Existing children could be markers as well as table-cells. */
            if (previous instanceof TableCell) {
                return (TableCell) previous;
            }
        }
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The initial value for this property.
     */
    public static FoValue getValueNoInstance(final FoContext context,
            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        if (parent != null) {
            return parent.getPropertyList().traitLineStackingStrategy(parent,
                    context);
        }
        return FoValue.MAX_HEIGHT;
    }
View Full Code Here

     */
    public FoValue getValue(final FoContext context, final FObj fobj) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            if (keyword == FoValue.INHERIT) {
                final FObj parent = fobj.effectiveParent(context);
                if (parent != null) {
                    return getInheritedValue(context, parent);
                }
                return getValueNoInstance(context, fobj);
            }
View Full Code Here

            case IDEOGRAPHIC: return 0;
            case ALPHABETIC: return 0;
            case HANGING: return 0;
            case MATHEMATICAL: return 0;
            case INHERIT: {
                final FObj parent = fobj.getParent();
                if (parent == null) {
                    return PdAlignmentAdjust.traitValueNoInstance();
                } else {
                    return parent.traitAlignmentAdjust(context, inlineContext);
                }
            }
            }
        }
        if (value().canEvalPercentage()) {
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The initial value for this property.
     */
    public static FoValue getValueNoInstance(final FoContext context,
            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        if (parent != null) {
            return parent.getPropertyList().traitPageBreakInside(parent,
                    context);
        }
        return FoValue.AUTO;
    }
View Full Code Here

     */
    public FoValue getValue(final FoContext context, final FObj fobj) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            if (keyword == FoValue.INHERIT) {
                final FObj parent = fobj.effectiveParent(context);
                if (parent != null) {
                    return getInheritedValue(context, parent);
                }
                return getValueNoInstance(context, fobj);
            }
View Full Code Here

     * @param fobj The FO for which this value is needed.
     * @return The initial value for this property.
     */
    public static int getValueNoInstance(final FoContext context,
            final FObj fobj) {
        final FObj parent = fobj.effectiveParent(context);
        if (parent == null) {
            return 0;
        }
        return parent.traitLastLineEndIndent(context);
    }
View Full Code Here

        }
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case INHERIT: {
                final FObj parent = fobj.effectiveParent(context);
                if (parent != null) {
                    switch (propertyType) {
                    case PAUSE_BEFORE: {
                        return parent.traitPauseBefore(context);
                    }
                    case PAUSE_AFTER: {
                        return parent.traitPauseAfter(context);
                    }
                    }
                    return 0;
                }
            }
View Full Code Here

            final FoProperty propertyType) {
        if (value().canEvalKeyword()) {
            final FoValue keyword = this.convertValueToFoValue(value());
            switch (keyword) {
            case INHERIT: {
                final FObj parent = fobj.effectiveParent(context);
                if (parent != null) {
                    switch (propertyType) {
                    case PAUSE_BEFORE: {
                        return parent.traitPauseBefore(context);
                    }
                    case PAUSE_AFTER: {
                        return parent.traitPauseAfter(context);
                    }
                    }
                    return 0;
                }
            }
View Full Code Here

TOP

Related Classes of org.foray.fotree.FObj

Copyright © 2018 www.massapicom. 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.