Examples of redo()


Examples of javax.swing.undo.UndoableEdit.redo()

        undoable = content.remove(3, 5);
        Position pos = content.createPosition(3);
        assertEquals(3, pos.getOffset());
        undoable.undo();
        assertEquals(8, pos.getOffset());
        undoable.redo();
        assertEquals(3, pos.getOffset());
    }

    public void testCreatePositionAfterUndone() throws BadLocationException {
        UndoableEdit undoable;
View Full Code Here

Examples of javax.swing.undo.UndoableEdit.redo()

        content.insertString(0, "0123456789");
        undoable = content.remove(3, 5);
        undoable.undo();
        Position pos = content.createPosition(5);
        assertEquals(5, pos.getOffset());
        undoable.redo();
        assertEquals(3, pos.getOffset());
        undoable.undo();
        assertEquals(5, pos.getOffset());
    }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit.redo()

        undoable = content.insertString(10, "big ");
        Position pos = content.createPosition(12);
        assertEquals(12, pos.getOffset());
        undoable.undo();
        assertEquals(10, pos.getOffset());
        undoable.redo();
        assertEquals(12, pos.getOffset());
    }

    public void testCreatePosition_WithInvalidValues() throws BadLocationException {
        content = new StringContent(10);
View Full Code Here

Examples of javax.swing.undo.UndoableEdit.redo()

        content.getChars(0, content.length(), text);
        assertEquals(20, text.array.length);
        assertEquals("01^^^2345\n", content.getString(0, content.length()));
        ue.undo();
        assertEquals("012345\n", content.getString(0, content.length()));
        ue.redo();
        assertEquals("01^^^2345\n", content.getString(0, content.length()));
    }

    public void testInsertString_WithInvalidValues() throws BadLocationException {
        content = new StringContent();
View Full Code Here

Examples of javax.swing.undo.UndoableEdit.redo()

        assertFalse(undoable.canRedo());
        assertTrue(undoable.canUndo());
        undoable.undo();
        assertTrue(undoable.canRedo());
        assertFalse(undoable.canUndo());
        undoable.redo();
        assertFalse(undoable.canRedo());
        assertTrue(undoable.canUndo());
        assertFalse(undoable.addEdit(null));
        assertFalse(undoable.addEdit(undoable));
    }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit.redo()

        assertEquals(20, text.array.length);
        assertNotNull(undoable);
        assertEquals("0111111\n", content.getString(0, content.length()));
        undoable.undo();
        assertEquals("012345^11111\n", content.getString(0, content.length()));
        undoable.redo();
        assertEquals("0111111\n", content.getString(0, content.length()));
    }

    public void testRemove_UndoableEdit() throws BadLocationException {
        UndoableEdit undoable = content.remove(2, 3);
View Full Code Here

Examples of javax.swing.undo.UndoableEdit.redo()

        assertFalse(undoable.canRedo());
        assertTrue(undoable.canUndo());
        undoable.undo();
        assertTrue(undoable.canRedo());
        assertFalse(undoable.canUndo());
        undoable.redo();
        assertFalse(undoable.canRedo());
        assertTrue(undoable.canUndo());
        assertFalse(undoable.addEdit(null));
        assertFalse(undoable.addEdit(undoable));
    }
View Full Code Here

Examples of javax.swing.undo.UndoableEdit.redo()

        assertEquals(20, text.array.length);
        assertNotNull(ue);
        assertEquals("0111111\n", content.getString(0, content.length()));
        ue.undo();
        assertEquals("012345^11111\n", content.getString(0, content.length()));
        ue.redo();
        assertEquals("0111111\n", content.getString(0, content.length()));
    }

    public void testPositionGC() throws BadLocationException {
        Vector<WeakReference<Position>> pos = new Vector<WeakReference<Position>>(10);
View Full Code Here

Examples of journal.io.api.Journal.redo()

            journal.write(new String("DATA" + i).getBytes("UTF-8"), writeType);
        }

        // Replay the journal forward by redoing:
        int i = 0;
        for (Location location : journal.redo()) {
            byte[] record = journal.read(location, Journal.ReadType.ASYNC);
            assertEquals("DATA" + i++, new String(record, "UTF-8"));
        }

        // Replay the journal backward by undoing:
View Full Code Here

Examples of me.taylorkelly.bigbrother.datablock.BBDataBlock.redo()

    public static void undo(Server server, Player player) {
        int i = 0;
        while (lastRollback.size() > 0) {
            BBDataBlock dataBlock = lastRollback.removeFirst();
            if (dataBlock != null) {
                dataBlock.redo(server);
                i++;
            }
        }
        if (undoRollback != null) {
            Connection conn = null;
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.