Package org.foray.area

Examples of org.foray.area.TextArea.crIpd()


        final TextArea textArea = (TextArea) node;

        final FreeStandingFont fsf = getHelveticaFont();
        /* The following computation is tested in {@link TestFont4a#testWidth()}. */
        final int textWidth = fsf.width("Test of Centering", 12000, 0, 0, true);
        assertEquals(textWidth, textArea.crIpd());

        /* The x value of the text area content rectangle should be at the x
         * location of the parent line area + 1/2 of the unused area in the
         * line. Total line area ipd = 468,000. Unused line area ipd =
         * 468,000 - 90,780 = 377,220. One half of the unused line area ipd =
View Full Code Here


        final FreeStandingFont fsf = getHelveticaFont();
        /* The following computation is tested in {@link TestFont4a#testWidth()}.
         * The extra word spacing is .3em = .3 * 12000 = 3600. */
        final int textWidth = fsf.width("Centered with Word Spacing", 12000, 0, 3600, true);
        assertEquals(textWidth, textArea.crIpd());

        /* The x value of the text area content rectangle should be at the x
         * location of the parent line area + 1/2 of the unused area in the
         * line. Total line area ipd = 468,000. Unused line area ipd =
         * 468,000 - 162,684 = 305,316. One half of the unused line area ipd =
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.