Package org.foray.area

Examples of org.foray.area.NormalFlowRA


    @Test
    public void testBorderStyle001() throws FOrayException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();
        final AreaTree areaTree = creator.buildAreaTree(
                "fo/border-style-001.fo");
        final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
                areaTree);

        final AreaNode node = firstNormalFlowArea.getChildAt(0);
        assertTrue(node instanceof NormalBlockArea);
        final NormalBlockArea blockArea = (NormalBlockArea) node;
        assertEquals(72000, blockArea.brOriginX());
        assertEquals(720000, blockArea.brOriginY());
        assertEquals(432000, blockArea.brIpd());
View Full Code Here


        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;
        return nfa;
    }
View Full Code Here

    @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. */
        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);
View Full Code Here

    @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());

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

     */
    @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);
        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

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

    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. */
        AreaNode node = firstNormalFlowArea.getChildAt(0);
        assertTrue(node instanceof NormalBlockArea);
        final NormalBlockArea blockArea = (NormalBlockArea) node;
        /* 1 inch left margin. */
        assertEquals(72000, blockArea.crOriginX());
        /* 10 inches from bottom (11 inches high, 1 inch top margin). */
 
View Full Code Here

    @Test
    public void testBlock004() throws FOrayException, FontException {
        final AreaTreeCreator creator = AreaTreeCreator.getInstance();
        final AreaTree areaTree = creator.buildAreaTree(
                "fo/block-004.fo");
        final NormalFlowRA firstNormalFlowArea = this.getFirstNormalFlowArea(
                areaTree);

        /* Test location and dimensions of the block area. */
        AreaNode node = firstNormalFlowArea.getChildAt(0);
        assertTrue(node instanceof NormalBlockArea);
        final NormalBlockArea blockArea = (NormalBlockArea) node;
        /* 1 inch left margin. */
        assertEquals(72000, blockArea.crOriginX());
        /* 10 inches from bottom (11 inches high, 1 inch top margin). */
 
View Full Code Here

TOP

Related Classes of org.foray.area.NormalFlowRA

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.