Package javax.swing.text.CompositeViewTest

Examples of javax.swing.text.CompositeViewTest.CompositeViewImpl


        super.setUp();
        doc = new PlainDocument();
        doc.insertString(0, "line1\nline2\n\u05DC\u05DD\nline3\n", null);
        // positions:        012345 678901 2     3     4 567890
        //                   0          1                     2
        view = new CompositeViewImpl(root = doc.getDefaultRootElement());
        view.loadChildren(factory = new ViewFactory() {
            public View create(final Element line) {
                return new PlainView(line);
            }
        });
View Full Code Here


    /**
     * <code>loadChildren</code> doesn't call <code>replace</code>.
     */
    public void testLoadChildren02() {
        final boolean[] called = new boolean[] { false };
        view = new CompositeViewImpl(root) {
            @Override
            public void replace(final int index, final int length, final View[] views) {
                called[0] = true;
                assertEquals(0, index);
                if (BasicSwingTestCase.isHarmony()) {
View Full Code Here

        super.setUp();
        doc = new PlainDocument();
        doc.insertString(0, "line1\nline2\n\u05DC\u05DD\nline3\n", null);
        // positions:        012345 678901 2     3     4 567890
        //                   0          1                     2
        view = new CompositeViewImpl(root = doc.getDefaultRootElement());
        view.loadChildren(factory = new ViewFactory() {
            public View create(final Element line) {
                return new PlainView(line);
            }
        });
View Full Code Here

    /**
     * <code>loadChildren</code> doesn't call <code>replace</code>.
     */
    public void testLoadChildren02() {
        final boolean[] called = new boolean[] { false };
        view = new CompositeViewImpl(root) {
            @Override
            public void replace(final int index, final int length, final View[] views) {
                called[0] = true;
                assertEquals(0, index);
                if (BasicSwingTestCase.isHarmony()) {
View Full Code Here

        doc = area.getDocument();
        doc.insertString(0, "line1\nline2\n\u05DC\u05DD\nline3\n", null);
        // positions:        012345 678901 2     3     4 567890
        //                   0          1                     2
        root = doc.getDefaultRootElement();
        view = new CompositeViewImpl(root) {
            private int getY(final ChildView view) {
                int result = 0;
                for (int i = 0; i < view.getID(); i++) {
                    result += ViewTestHelpers.getHeight(i);
                }
View Full Code Here

TOP

Related Classes of javax.swing.text.CompositeViewTest.CompositeViewImpl

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.