Package javax.swing.text

Examples of javax.swing.text.PlainView


                .getUI()).getMaximumSize(jta));
    }

    public void testSetView() throws Exception {
        jta.wasCallInvalidate = false;
        view = new PlainView(jta.getDocument().getDefaultRootElement());
        ((BasicTextUI) jta.getUI()).setView(view);
        wasCallInvalidate = jta.wasCallInvalidate;
        assertTrue(wasCallInvalidate);
        assertEquals(view, ((BasicTextUI) jta.getUI()).getRootView(jta).getView(0));
    }
View Full Code Here


    public void testSetParent_View() {
        // Regression test for HARMONY-1767
        PlainDocument doc = new PlainDocument();
        Element e = doc.getDefaultRootElement();
        ComponentView obj = new ComponentView(new TestElement());
        obj.setParent(new PlainView(e));
   
View Full Code Here

                .getUI()).getMaximumSize(jta));
    }

    public void testSetView() throws Exception {
        jta.wasCallInvalidate = false;
        view = new PlainView(jta.getDocument().getDefaultRootElement());
        ((BasicTextUI) jta.getUI()).setView(view);
        wasCallInvalidate = jta.wasCallInvalidate;
        assertTrue(wasCallInvalidate);
        assertEquals(view, ((BasicTextUI) jta.getUI()).getRootView(jta).getView(0));
    }
View Full Code Here

    }

    public void testCalculateMinorAxisRequirements04() throws Exception {
        factory = new ViewFactory() {
            public View create(Element element) {
                PlainView result = new PlainView(element) {
                    public float getPreferredSpan(int axis) {
                        if (axis == X_AXIS) {
                            return CHAR_WIDTH
                                   * (getEndOffset() - getStartOffset());
                        }
View Full Code Here

                .getUI()).getMaximumSize(jta));
    }

    public void testSetView() throws Exception {
        jta.wasCallInvalidate = false;
        view = new PlainView(jta.getDocument().getDefaultRootElement());
        ((BasicTextUI) jta.getUI()).setView(view);
        wasCallInvalidate = jta.wasCallInvalidate;
        assertTrue(wasCallInvalidate);
        assertEquals(view, ((BasicTextUI) jta.getUI()).getRootView(jta).getView(0));
    }
View Full Code Here

        };
        assertTrue(propertiesMarker.isOccurred());
        view.setParent(null);
        assertFalse(propertiesMarker.isOccurred());

        view.setParent(new PlainView(doc.getDefaultRootElement()));
        assertTrue(propertiesMarker.isOccurred());

        view.setParent(null);
        assertFalse(propertiesMarker.isOccurred());
    }
View Full Code Here

        };
        assertFalse(propertiesMarker.isOccurred());
        view.setParent(null);
        assertFalse(propertiesMarker.isOccurred());

        view.setParent(new PlainView(doc.getDefaultRootElement()));
        assertTrue(propertiesMarker.isOccurred());

        view.setParent(null);
        assertFalse(propertiesMarker.isOccurred());
    }
View Full Code Here

        }
        if (lineWrap) {
            return new WrappedPlainView(element, wordWrap);
        }

        return new PlainView(element);

    }
View Full Code Here

    }

    public void testCalculateMinorAxisRequirements04() throws Exception {
        factory = new ViewFactory() {
            public View create(Element element) {
                PlainView result = new PlainView(element) {
                    public float getPreferredSpan(int axis) {
                        if (axis == X_AXIS) {
                            return CHAR_WIDTH
                                   * (getEndOffset() - getStartOffset());
                        }
View Full Code Here

        };
        assertTrue(propertiesMarker.isOccurred());
        view.setParent(null);
        assertFalse(propertiesMarker.isOccurred());

        view.setParent(new PlainView(doc.getDefaultRootElement()));
        assertTrue(propertiesMarker.isOccurred());

        view.setParent(null);
        assertFalse(propertiesMarker.isOccurred());
    }
View Full Code Here

TOP

Related Classes of javax.swing.text.PlainView

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.