Package javax.swing.text.AbstractDocumentTest

Examples of javax.swing.text.AbstractDocumentTest.DisAbstractedDocument


     * Initializes fixture for tests.
     */
    @Override
    protected void setUp() throws Exception {
        super.setUp();
        doc = new DisAbstractedDocument(new GapContent());
        change = null;
        insert = null;
        remove = null;
        undo = null;
    }
View Full Code Here


    /**
     * Tests which events are fired at text insert
     * when content doesn't support undo.
     */
    public void testInsertString02() throws Exception {
        doc = new DisAbstractedDocument(new NoUndoContent());
        doc.addDocumentListener(this);
        doc.addUndoableEditListener(this);
        doc.insertString(0, "test string\nthe second line", null);
        checkCalledEvents(false, true, false, false);
    }
View Full Code Here

    /**
     * Tests which events are fired at RTL-text insert
     * when content doesn't support undo.
     */
    public void testInsertString03() throws Exception {
        doc = new DisAbstractedDocument(new NoUndoContent());
        doc.addDocumentListener(this);
        doc.addUndoableEditListener(this);
        doc.insertString(0, "\u05DC\u05DD", null);
        checkCalledEvents(false, true, false, false);
        assertNotNull(insert.getChange(doc.getBidiRootElement()));
View Full Code Here

    /**
     * Tests which events are fired at text remove
     * when content doesn't support undo.
     */
    public void testRemove01() throws Exception {
        doc = new DisAbstractedDocument(new NoUndoContent());
        doc.insertString(0, "test string\nthe second line", null);
        doc.addDocumentListener(this);
        doc.addUndoableEditListener(this);
        doc.remove(0, 4);
        checkCalledEvents(false, false, true, false);
View Full Code Here

    /**
     * Tests which events are fired at RTL-text remove
     * when content doesn't support undo.
     */
    public void testRemove02() throws Exception {
        doc = new DisAbstractedDocument(new NoUndoContent());
        doc.insertString(0, "\u05DC\u05DD test string", null);
        doc.addDocumentListener(this);
        doc.addUndoableEditListener(this);
        doc.remove(0, 2);
        checkCalledEvents(false, false, true, false);
View Full Code Here

    /**
     * Tests which events are fired when content support undo for
     * remove but doesn't support one for insert.
     */
    public void testInsertRemove() throws Exception {
        doc = new DisAbstractedDocument(new GapContent() {
            private static final long serialVersionUID = 1L;

            @Override
            public UndoableEdit insertString(int where, String str) throws BadLocationException {
                super.insertString(where, str);
View Full Code Here

    private final String text = "text\n" + AbstractDocument_UpdateTest.RTL;

    @Override
    protected void setUp() throws Exception {
        toSave = doc = new DisAbstractedDocument(new GapContent());
        doc.insertString(0, text, null);
        doc.putProperty(key, value);
        doc.setDocumentFilter(new AbstractDocument_FilterTest.Filter());
        super.setUp();
    }
View Full Code Here

TOP

Related Classes of javax.swing.text.AbstractDocumentTest.DisAbstractedDocument

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.