Package org.axsl.area

Examples of org.axsl.area.AreaTreeException


     */
    public void setParent(final AreaNode node) throws AreaTreeException {
        if (node instanceof ListBlockArea) {
            this.parent = (ListBlockArea) node;
        } else {
            throw new AreaTreeException("Parent of ListItemArea must be a "
                    + "ListBlockArea");
        }
    }
View Full Code Here


     * {@inheritDoc}
     */
    public Status layout(final AreaNode areaNode,
            final GraftingPoint graftingPoint) throws AreaTreeException {
        if (! (areaNode instanceof ListItemArea)) {
            throw new AreaTreeException("Illegal parent area for "
                    + "fo:list-item-label");
        }
        final ListItemArea listItemArea = (ListItemArea) areaNode;
        final ListItemLabelContainer container =
                listItemArea.makeListItemLabelContainer(this.node,
View Full Code Here

                foContext);
        try {
            status = lb.processLineContent(contextAware, start, end, lineArea);
        } catch (final TextException e) {
            final Fo generatedBy = lineArea.traitGeneratedBy();
            throw new AreaTreeException("Error in text layout:\n"
                    + generatedBy.getContextMessage(), e);
        }
        this.layout.setLineBreaker(lb);
        if (status >= end) {
            return -1;
View Full Code Here

                foContext);
        try {
            status = lb.processLineContent(contextAware, -1, -1, lineArea);
        } catch (final TextException e) {
            final Fo generatedBy = lineArea.traitGeneratedBy();
            throw new AreaTreeException("Error in non-text layout:\n"
                    + generatedBy.getContextMessage());
        }
        this.layout.setLineBreaker(lb);
        return status;
    }
View Full Code Here

        } else {
            blockArea = areaNode.ancestorNormalBlockArea();
        }
        if (blockArea == null) {
            final Fo foNode = this.getFONode();
            throw new AreaTreeException("Layout of inline objects must be "
                    + "inside a block:\n" + foNode.getContextMessage());
        }
        final BlockPL blockPL = this.layout.getBlockPL(blockArea);
        return blockPL.getCurrentLineArea(blockArea);
    }
View Full Code Here

     */
    public void setParent(final AreaNode node) throws AreaTreeException {
        if (node instanceof TableRowContainer) {
            this.parent = (TableRowContainer) node;
        } else {
            throw new AreaTreeException("Parent of TableCellRA must be a "
                    + "TableRowContainer");
        }
    }
View Full Code Here

     */
    public Area getOverflowArea(final Area childRequesting)
            throws AreaTreeException {
        final Area overflow = ancestorArea().getOverflowArea(this);
        if (overflow == null) {
            throw new AreaTreeException("BlockArea overflow failed.");
        }
        if (! (overflow instanceof BlockContentFactory)) {
            throw new AreaTreeException("NormalBlockArea overflow parent "
                    + "expected to be a BlockContentFactory.");
        }
        final BlockContentFactory bcFactory = (BlockContentFactory) overflow;
        final Block block = this.traitGeneratedBy();
        final org.axsl.area.NormalBlockArea nbArea
View Full Code Here

        } else if (span == Span.NONE) {
            /* create new span area with multiple columns; return first column
             * area */
            return addSpanArea(this.traitColumnCount());
        } else {
            throw new AreaTreeException("BodyAreaContainer::getNextArea(): "
                    + "Span attribute messed up");
        }
    }
View Full Code Here

            throws AreaTreeException {
        if (this.areaTree == null) {
            this.areaTree = pageCollection.getAreaTree();
        } else {
            if (this.areaTree != pageCollection.getAreaTree()) {
                throw new AreaTreeException("Cannot reuse a LayoutStrategy "
                        + "instance.");
            }
        }
        processPageSequence(pageCollection);
        pageCollection.layoutComplete();
View Full Code Here

     * {@inheritDoc}
     */
    public Status layout(final AreaNode areaNode,
            final GraftingPoint graftingPoint) throws AreaTreeException {
        if (! (areaNode instanceof BlockContentFactory)) {
            throw new AreaTreeException("Area \"" + areaNode.getAreaName()
                    + "\" cannot contain a NormalBlockArea.");
        }
        final BlockContentFactory bcArea = (BlockContentFactory) areaNode;

        if (! this.breakStatusBeforeChecked) {
            this.breakStatusBeforeChecked = true;
            // no break if first in area tree, or leading in context
            // area
            final Status breakBeforeStatus = getLayout().checkBreakBefore(
                    this.node, areaNode.nearestArea());
            if (breakBeforeStatus != Status.OK) {
                return breakBeforeStatus;
            }
        }

        NormalBlockArea blockArea;

        if (! this.anythingLaidOut) {
            this.noLayoutCount++;
        }
        if (this.noLayoutCount > this.infLoopThreshhold) {
            throw new AreaTreeException(
                "No meaningful layout in block after many attempts.\n"
                    + "Infinite loop is assumed. Processing halted. Context:\n"
                    + this.node.getContextMessage());
        }

View Full Code Here

TOP

Related Classes of org.axsl.area.AreaTreeException

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.