Package org.axsl.area

Examples of org.axsl.area.NormalBlockArea


        if (addNonTextItemToLine(lineArea, nonText, foContext) == 1) {
            // It fit on the line.
            return Status.OK;
        }
        // It did not fit on the line. Create new line & try again.
        final NormalBlockArea blockArea
                = (NormalBlockArea) lineArea.ancestorArea();
        lineArea = blockArea.makeLineArea(false);
        final BlockPL blockPL = this.layout.getBlockPL(blockArea);
        blockPL.setCurrentLineArea(lineArea);

        if (lineArea == null) {
            return Status.AREA_FULL_SOME;
View Full Code Here


    protected LineArea activeLineArea(final AreaNode areaNode)
            throws AreaTreeException {
        if (areaNode instanceof LineArea) {
            return (LineArea) areaNode;
        }
        NormalBlockArea blockArea = null;
        if (areaNode instanceof NormalBlockArea) {
            blockArea = (NormalBlockArea) areaNode;
        } else {
            blockArea = areaNode.ancestorNormalBlockArea();
        }
View Full Code Here

            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());
        }

        if (getProgress() == FONodePL.BREAK_AFTER) {
            return Status.OK;
        }

        if (getProgress() == FONodePL.START) {
            // Reset the "loop counter".
            this.noLayoutCount = 0;

            if (areaNode instanceof NormalBlockArea) {
                getLayout().completeCurrentLineInBlock(
                        (NormalBlockArea) areaNode);
            }
            setProgress(0);
        }

        blockArea = bcArea.makeNormalBlockArea(this.node, graftingPoint);

        for (int i = getProgress(); i < this.node.getChildCount(); i++) {
            final Fo fo = this.node.getChildAt(i);
            final FONodePL nodePL = this.getLayoutProxy(fo);

            Status status = null;
            boolean doneProcessingItem = false;
            while (! doneProcessingItem) {
                status = nodePL.layout(blockArea, graftingPoint);
                if (! status.isIncomplete()
                        || status.isPageBreak()) {
                    doneProcessingItem = true;
                    break;
                }
                this.currentLineArea = blockArea.makeLineArea(false);
                if (this.currentLineArea == null) {
                    doneProcessingItem = true;
                }
            }
View Full Code Here

TOP

Related Classes of org.axsl.area.NormalBlockArea

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.