Package org.foray.fotree

Examples of org.foray.fotree.FOTreeBuilder


     * @return The parsed FO Tree instance.
     * @throws FOrayException For errors building the FO Tree.
     */
    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();
View Full Code Here


     * Test of fo/font-family-001.fo.
     * @throws FOrayException For errors creating the FO Tree.
     */
    public void testFontFamily001() throws FOrayException {
        final FoDocumentReader reader = FoDocumentReader.getInstance();
        final FOTreeBuilder foTree = reader.buildFoTree(
                "fo/font-family-001.fo");
        final Flow flow = this.getFlow(foTree);

        FObj node = flow.getChildAt(0);
        assertTrue(node instanceof Block);
View Full Code Here

     * Test of fo/font-size-001.fo.
     * @throws FOrayException For errors creating the FO Tree.
     */
    public void testFontSize001() throws FOrayException {
        final FoDocumentReader reader = FoDocumentReader.getInstance();
        final FOTreeBuilder foTree = reader.buildFoTree("fo/font-size-001.fo");
        final Flow flow = this.getFlow(foTree);

        FObj node = flow.getChildAt(0);
        assertTrue(node instanceof Block);
        Block block = (Block) node;
View Full Code Here

        } catch (final SAXException e) {
            throw new FOrayException(e);
        } catch (final ParserConfigurationException e) {
            throw new FOrayException(e);
        }
        final FOTreeBuilder foTree = this.treeServer.makeFoTree();
        final FontServer fontServer = this.treeServer.getFontServer();
        final FontConsumer fontConsumer = fontServer.makeFontConsumer();
        foTree.setFontConsumer(fontConsumer);
        xmlReader.setContentHandler(foTree);
        try {
            xmlReader.parse(foInputSource);
        } catch (final IOException e) {
            throw new FOrayException(e);
View Full Code Here

     * This file contains an fo:instream-foreign-object with a simple SVG in it.
     * @throws FOrayException For errors creating the FO Tree.
     */
    public void testGraphic001() throws FOrayException {
        final FoDocumentReader reader = FoDocumentReader.getInstance();
        final FOTreeBuilder foTree = reader.buildFoTree(
                "fo/graphic-001.fo");
        final Flow flow = this.getFlow(foTree);

        /* The second child should be a block ... */
        FObj node = flow.getChildAt(1);
View Full Code Here

TOP

Related Classes of org.foray.fotree.FOTreeBuilder

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.