Package org.axsl.area

Examples of org.axsl.area.AreaTreeException


     * {@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 BlockContentArea.");
        }
        final BlockContentFactory bcArea = (BlockContentFactory) areaNode;

        if (getProgress() == FONodePL.START) {
View Full Code Here


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

        if (! (areaNode instanceof BlockContentFactory)) {
            throw new AreaTreeException("Area \"" + areaNode.getAreaName()
                    + "\" cannot contain a TableArea.");
        }
        final BlockContentFactory bcArea = (BlockContentFactory) areaNode;

        if (getProgress() == FONodePL.START) {
            if (areaNode instanceof NormalBlockArea) {
                getLayout().completeCurrentLineInBlock(
                        (NormalBlockArea) areaNode);
            }
            setProgress(0);

            if (this.table.traitBreakBefore(areaNode) == Break.PAGE) {
                return Status.FORCE_PAGE_BREAK;
            }

            if (this.table.traitBreakBefore(areaNode) == Break.ODD_PAGE) {
                return Status.FORCE_PAGE_BREAK_ODD;
            }

            if (this.table.traitBreakBefore(areaNode) == Break.EVEN_PAGE) {
                return Status.FORCE_PAGE_BREAK_EVEN;
            }

            /* Process the marker children. */
            for (int i = getProgress(); i < this.table.qtyMarkerChildren();
                    i++) {
                final Fo fo = this.table.getChildAt(i);
                if (fo instanceof Marker) {
                    final MarkerPL markerPL = (MarkerPL) getLayoutProxy(fo);
                    markerPL.layout(areaNode, graftingPoint);
                    this.setProgress(i);
                } else {
                    throw new AreaTreeException("Marker object expected.");
                }
            }
        }

        /* For now, we bail out if the columns widths are not specified. */
 
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 ListBlockArea.");
        }
        final BlockContentFactory bcArea = (BlockContentFactory) areaNode;

        final ListBlockPL listBlockPL = (ListBlockPL) getLayoutProxy(this.node);
View Full Code Here

     * {@inheritDoc}
     */
    public Status layout(final AreaNode areaNode,
            final GraftingPoint graftingPoint) throws AreaTreeException {
        if (! (areaNode instanceof ListBlockArea)) {
            throw new AreaTreeException("Illegal parent area for "
                    + "fo:list-item");
        }
        final ListBlockArea listBlockArea = (ListBlockArea) areaNode;

        if (getProgress() == FONodePL.START) {
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 ListItemBodyContainer container =
            listItemArea.makeListItemBodyContainer(this.node,
View Full Code Here

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

    public FOLinkageMarker(final Fo foGenerator)
            throws AreaTreeException {
        super(foGenerator);
        final Marker marker = foGenerator.ancestorMarker();
        if (marker == null) {
            throw new AreaTreeException("(FOray) FOLinkageMarker "
                    + "construction attempted for object\n"
                    + "  not descended from an fo:marker:\n"
                    + foGenerator.getContextMessage());
        }
    }
View Full Code Here

            return (LineArea) node;
        }
        if (node instanceof AbstractInlineArea) {
            return (AbstractInlineArea) node;
        }
        throw new AreaTreeException("Parent of " + this.getAreaName()
                + " must be a LineArea");
    }
View Full Code Here

     */
    public void setParent(final AreaNode node) throws AreaTreeException {
        if (node instanceof TableRA) {
            this.parent = (TableRA) node;
        } else {
            throw new AreaTreeException("Parent of " + this.getAreaName()
                    + " must be a Table");
        }
    }
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.