Examples of AreaNode


Examples of org.axsl.galley.AreaNode

     * @param area The area whose children should be rendered.
     * @throws GalleyVisitorException For errors during rendering.
     */
    public void renderChildren(final AreaNode area) throws GalleyVisitorException {
        for (int i = 0; i < area.getChildCount(); i++) {
            final AreaNode child = area.getChildAt(i);
            child.render(this);
        }
    }
View Full Code Here

Examples of org.axsl.galley.AreaNode

        final BookmarkTree bookmarkTree = this.areaTree.getBookmarkTree();
        if (bookmarkTree != null) {
            render(bookmarkTree);
        }
        for (int i = 0; i < this.areaTree.getChildCount(); i++) {
            final AreaNode atNode = this.areaTree.getChildAt(i);
            if (! (atNode instanceof PageCollection)) {
                atNode.render(this);
            }
        }
    }
View Full Code Here

Examples of org.axsl.galley.AreaNode

        }
        if (area.isLinkRoot()) {
            createBasicLink(area);
        }
        for (int i = 0; i < area.getChildCount(); i++) {
            final AreaNode child = area.getChildAt(i);
            if (! (child instanceof Area)) {
                continue;
            }
            final Area areaChild = (Area) child;
            renderDestinations(areaChild);
View Full Code Here

Examples of org.foray.area.AreaNode

        final PageCollection pageCollection = getPageCollection(areaTree, 1);
        final PageRA firstPage = getPage(pageCollection, 1);
        final RegionRABody regionBody = firstPage.getRegionBody(
                "xsl-region-body");
        final MainRA main = regionBody.getMainRefArea();
        AreaNode node = main.getChildAt(0);
        assertTrue(node instanceof SpanRA);
        final SpanRA span = (SpanRA) node;
        node = span.getChildAt(0);
        assertTrue(node instanceof NormalFlowRA);
        final NormalFlowRA nfa = (NormalFlowRA) node;
View Full Code Here

Examples of org.foray.area.AreaNode

     * etc.
     * @return The requested page collection, or null if it does not exist.
     */
    protected PageCollection getPageCollection(final AreaTree areaTree,
            final int collectionNum) {
        final AreaNode node = areaTree.getChildAt(0);
        assertTrue(node instanceof PageCollection);
        final PageCollection pageCollection = (PageCollection) node;
        return pageCollection;
    }
View Full Code Here

Examples of org.foray.area.AreaNode

        assertNotNull(pageCollection);
        /* Convert the ordinal page number to an index into the children. */
        final int index = pageNum - 1;
        assertTrue(index >= 0);
        assertTrue(index < pageCollection.getChildCount());
        final AreaNode node = pageCollection.getChildAt(index);
        assertTrue(node instanceof PageRA);
        final PageRA page = (PageRA) node;
        return page;
    }
View Full Code Here

Examples of org.foray.area.AreaNode

        /* There are two block areas. */
        assertEquals(2, firstNormalFlowArea.getChildCount());

        /* The second one contains the graphic. */
        AreaNode node = firstNormalFlowArea.getChildAt(1);
        assertTrue(node instanceof NormalBlockArea);

        /* It has one child, a LineArea ... */
        assertEquals(1, node.getChildCount());
        node = node.getChildAt(0);
        assertTrue(node instanceof LineArea);

        /* ... which has one child, an ExternalGraphicArea. */
        assertEquals(1, node.getChildCount());
        node = node.getChildAt(0);
        assertTrue(node instanceof ExternalGraphicArea);

        /* First test the size of the viewport. */
        final ExternalGraphicArea ega = (ExternalGraphicArea) node;
        final int width = ega.crIpd();
View Full Code Here

Examples of org.foray.area.AreaNode

        final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
                areaTree);
        assertEquals(1, firstNormalFlowArea.getChildCount());

        /* The block area. */
        AreaNode node = firstNormalFlowArea.getChildAt(0);
        assertTrue(node instanceof NormalBlockArea);
        final NormalBlockArea blockArea = (NormalBlockArea) node;
        assertEquals(1, blockArea.getChildCount());

        /* The only child of the block area is a line area. */
 
View Full Code Here

Examples of org.foray.area.AreaNode

        final AreaTree areaTree = creator.buildAreaTree("fo/vertical-001.fo");
        final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
                areaTree);

        /* The block area. */
        AreaNode node = firstNormalFlowArea.getChildAt(0);
        assertTrue(node instanceof NormalBlockArea);
        final NormalBlockArea blockArea = (NormalBlockArea) node;
        final FontUse font = blockArea.getPrimaryFont();
        assertEquals("Courier", font.getFont().getPostscriptName());
        assertEquals(12000, blockArea.traitFontSize());
View Full Code Here

Examples of org.foray.area.AreaNode

                "fo/block-001.fo");
        final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
                areaTree);

        /* The outer block area. */
        AreaNode node = firstNormalFlowArea.getChildAt(0);
        assertTrue(node instanceof NormalBlockArea);
        final NormalBlockArea outerBlockArea = (NormalBlockArea) node;
        /* 1 inch left margin. */
        assertEquals(72000, outerBlockArea.crOriginX());
        /* 10 inches from bottom (11 inches high, 1 inch top margin). */
 
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.