Package org.foray.area

Examples of org.foray.area.PageCollection


     * Returns the first normal-flow reference area in a given area tree.
     * @param areaTree The area tree being tested.
     * @return The first normal-flow reference area in {@code areaTree}.
     */
    protected NormalFlowRA getFirstNormalFlowArea(final AreaTree areaTree) {
        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);
View Full Code Here


     */
    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

        final PioneerLS layout = this.layoutFactory.makeLayout();
        final Iterator<PageSequence> iterator = root.getPageSequenceIterator();
        while (iterator.hasNext()) {
            final PageSequence pageSequence = iterator.next();
            try {
                final PageCollection collection = areaTree.makePageCollection(
                        pageSequence);
                layout.formatPageSequence(collection);
            } catch (final AreaTreeException e) {
                throw new FOrayException(e);
            }
View Full Code Here

    @Test
    public void testBlock002() throws FOrayException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();
        final AreaTree areaTree = creator.buildAreaTree(
                "fo/block-002.fo");
        final PageCollection pageCollection = this.getPageCollection(areaTree,
                1);
        final int numPages = pageCollection.getChildCount();
        assertEquals(2, numPages);
        final String documentContent = this.getText(areaTree);
        final String testString =
            " This document is on a short (4 inches high) page, "
            + "and contains one block. "
View Full Code Here

TOP

Related Classes of org.foray.area.PageCollection

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.