Package javax.swing.undo

Examples of javax.swing.undo.AbstractUndoableEdit


        UndoableEditEvent event = new UndoableEditEvent(source, null);
        assertEquals(source, event.getSource());
    }

    public void testGetEdit() throws Exception {
        UndoableEdit edit = new AbstractUndoableEdit();
        UndoableEditEvent event = new UndoableEditEvent(source, edit);
        assertEquals(edit, event.getEdit());
    }
View Full Code Here


        assertEquals(edit, event.getEdit());
    }

    public void testEventProperlyInitialized() throws Exception {
        UndoableEditEvent event = new UndoableEditEvent(new Object(),
                new AbstractUndoableEdit());
        assertNotNull(event.getSource());
        assertNotNull(event.getEdit());
    }
View Full Code Here

     */
    public void testToString() {
        String ref = "[";
        Vector<?> edits = getEdits(insert);
        for (int i = 0; i < edits.size(); i++) {
            AbstractUndoableEdit edit = (AbstractUndoableEdit) edits.get(i);
            if (i != 0) {
                ref += ", ";
            }
            ref += edit.toString();
        }
        ref += "]";
        assertEquals(ref, insert.toString());
    }
View Full Code Here

            return null;
        }
    };

    public void testFireUndoableEditUpdate() {
        UndoableEditEvent undoEvent = new UndoableEditEvent(doc, new AbstractUndoableEdit());
        doc.addUndoableEditListener(this);
        doc.fireUndoableEditUpdate(undoEvent);
        checkCalledEvents(false, false, false, true);
        assertSame(undoEvent, undo);
    }
View Full Code Here

TOP

Related Classes of javax.swing.undo.AbstractUndoableEdit

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.