Examples of AreaTree


Examples of org.axsl.area.AreaTree

            foContext = new OverrideGraftingContext(lineArea,
                    graftingPoint);
        }
        EagerLineBreaker lb = this.layout.getLineBreaker();
        if (lb == null) {
            final AreaTree areaTree = lineArea.getAreaTree();
            final TextServer textServer = areaTree.getTextServer();
            final FontConsumer fontConsumer = areaTree.getFontConsumer();
            lb = textServer.provideEagerLineBreaker(null, this.layout,
                    fontConsumer);
        }
        int status = 0;
        final FoLineText contextAware = lineText.getContextWrapper(
View Full Code Here

Examples of org.axsl.area.AreaTree

    protected int addNonTextItemToLine(final LineArea lineArea,
            final FoLineNonText nonText, final FoContext foContext)
            throws AreaTreeException {
        EagerLineBreaker lb = this.layout.getLineBreaker();
        if (lb == null) {
            final AreaTree areaTree = lineArea.getAreaTree();
            final TextServer textServer = areaTree.getTextServer();
            final FontConsumer fontConsumer = areaTree.getFontConsumer();
            lb = textServer.provideEagerLineBreaker(null,
                    this.layout, fontConsumer);
        }
        int status = 0;
        final FoLineNonText contextAware = nonText.getContextWrapper(
View Full Code Here

Examples of org.foray.area.AreaTree

     */
    public AreaTree buildAreaTree(final String file) throws FOrayException {
        final FoDocumentReader foReader = FoDocumentReader.getInstance();
        final FOTreeBuilder foTree = foReader.buildFoTree(file);
        final Root root = foTree.getRootFo();
        final AreaTree areaTree = this.areaTreeFactory.makeAreaTree(root);
        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

Examples of org.foray.area.AreaTree

     * @throws FOrayException For errors creating the FO Tree or Area Tree.
     */
    @Test
    public void testGraphic002() throws FOrayException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();
        final AreaTree areaTree = creator.buildAreaTree(
                "fo/graphic-002.fo");
        final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
                areaTree);

        /* There are two block areas. */
 
View Full Code Here

Examples of org.foray.area.AreaTree

     * @throws FOrayException For errors creating the FO Tree or Area Tree.
     */
    @Test
    public void testInline001() throws FOrayException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();
        final AreaTree areaTree = creator.buildAreaTree(
                "fo/inline-001.fo");
        final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
                areaTree);
        assertEquals(1, firstNormalFlowArea.getChildCount());

View Full Code Here

Examples of org.foray.area.AreaTree

     * @throws FOrayException For errors creating the FO Tree or Area Tree.
     */
    @Test
    public void testMetadata001() throws FOrayException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();
        final AreaTree areaTree = creator.buildAreaTree(
                "fo/metadata-001.fo");
        assertNotNull(areaTree);
        assertEquals("Test Title", areaTree.getTitle());
        assertEquals("Test Author", areaTree.getAuthor());
        assertEquals("Test Subject", areaTree.getSubject());
        assertEquals("Test Keywords", areaTree.getKeywords());
    }
View Full Code Here

Examples of org.foray.area.AreaTree

     * @throws FOrayException For errors creating the FO Tree or Area Tree.
     */
    @Test
    public void testVertical001() throws FOrayException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();
        final AreaTree areaTree = creator.buildAreaTree("fo/vertical-001.fo");
        final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
                areaTree);

        /* The block area. */
        AreaNode node = firstNormalFlowArea.getChildAt(0);
View Full Code Here

Examples of org.foray.area.AreaTree

     * @throws FOrayException For errors creating the FO Tree or Area Tree.
     */
    @Test
    public void testBlock001() throws FOrayException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();
        final AreaTree areaTree = creator.buildAreaTree(
                "fo/block-001.fo");
        final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
                areaTree);

        /* The outer block area. */
 
View Full Code Here

Examples of org.foray.area.AreaTree

     * @throws FOrayException For errors creating the FO Tree or Area Tree.
     */
    @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);
View Full Code Here

Examples of org.foray.area.AreaTree

     */
    @Test
    public void testBlock003() throws FOrayException, FontException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();

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

        /* Test location and dimensions of the block area. */
 
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.