Examples of LineArea


Examples of org.foray.area.LineArea

        assertEquals(1, blockArea.getChildCount());

        /* The only child of the block area is a line area. */
        node = blockArea.getChildAt(0);
        assertTrue(node instanceof LineArea);
        final LineArea lineArea = (LineArea) node;
        assertEquals(3, lineArea.getChildCount());

        /* The first child of the line area is a text area. */
        node = lineArea.getChildAt(0);
        assertTrue(node instanceof TextArea);
        final TextArea textArea1 = (TextArea) node;
        assertEquals("Lighter(1), ", textArea1.getText().toString());

        /* The second child of the line area is the outside inline area. */
        node = lineArea.getChildAt(1);
        assertTrue(node instanceof InlineArea);
        final InlineArea inlineArea1 = (InlineArea) node;
        assertEquals(3, inlineArea1.getChildCount());

        /* The first child of the outside inline area is a text area. */
        node = inlineArea1.getChildAt(0);
        assertTrue(node instanceof TextArea);
        final TextArea textArea2 = (TextArea) node;
        assertEquals("Bolder(1), ", textArea2.getText().toString());

        /* The second child of the outside inline area is the inside inline area. */
        node = inlineArea1.getChildAt(1);
        assertTrue(node instanceof InlineArea);
        final InlineArea inlineArea2 = (InlineArea) node;
        assertEquals(1, inlineArea2.getChildCount());

        /* The first and only child of the inside inline area is a text area. */
        node = inlineArea2.getChildAt(0);
        assertTrue(node instanceof TextArea);
        final TextArea textArea3 = (TextArea) node;
        final String textArea3Text = textArea3.getText().toString();
        assertEquals("Lighter(2), ", textArea3Text);

        /* The third child of the outside inline area is another text area. */
        node = inlineArea1.getChildAt(2);
        assertTrue(node instanceof TextArea);
        final TextArea textArea4 = (TextArea) node;
        assertEquals("Bolder(2), ", textArea4.getText().toString());

        /* The third child of the line area is another text area. */
        node = lineArea.getChildAt(2);
        assertTrue(node instanceof TextArea);
        final TextArea textArea5 = (TextArea) node;
        assertEquals("Lighter(3).", textArea5.getText().toString());

    }
View Full Code Here

Examples of org.foray.area.LineArea

        assertEquals(12000, blockArea.traitFontSize());

        /* The first child of the block area is a line-area. */
        node = blockArea.getChildAt(0);
        assertTrue(node instanceof LineArea);
        final LineArea lineArea = (LineArea) node;
        final int lineY = lineArea.alignmentPointY();

        /* The second child of the line area is an inline-area. */
        node = lineArea.getChildAt(1);
        assertTrue(node instanceof InlineArea);
        final InlineArea inlineArea = (InlineArea) node;
        final int inlineY = inlineArea.baselineY();

        /* The current algorithm for computing the "super" baseline shift for the Base14-Courier
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.