Examples of undo()


Examples of com.sun.star.document.XUndoManager.undo()

                @Override
                public void run()
                {
                    for ( int j=0; j<actionsPerThread; ++j )
                    {
                        try { undoManager.undo(); }
                        catch ( final Exception e )
                        {
                            fail( "Those dummy actions are not expected to fail." );
                            return;
                        }
View Full Code Here

Examples of com.tinygo.logic.DocumentedGame.undo()

            assertEquals(Board.NONE, game.board.get(0, 0));
            assertEquals(Board.NONE, game.board.get(1, 1));
            assertEquals(Board.NONE, game.board.get(2, 2));
            game.next();
            game.next();
            game.undo();
            assertEquals(Board.BLACK, game.board.get(0, 0));
            assertEquals(Board.WHITE, game.board.get(1, 1));
            assertEquals(Board.NONE, game.board.get(2, 2));
            game.undo();
            assertEquals(Board.NONE, game.board.get(0, 0));
View Full Code Here

Examples of com.volantis.mcs.eclipse.common.odom.ODOMChangeEvent.undo()

        ListIterator li = changeEvents.listIterator(changeEvents.size());
        List xpaths = Collections.EMPTY_LIST;

        while (li.hasPrevious()) {
            ODOMChangeEvent changeEvent = (ODOMChangeEvent) li.previous();
            XPath xpath = changeEvent.undo();
            xpaths = addIfNotNullAndNotAlreadyContained(xpath, xpaths);
        }

        return new UndoRedoInfo(xpaths, undoRedoMemento);
    }
View Full Code Here

Examples of com.volantis.mcs.interaction.impl.operation.SetModelObjectOperation.undo()

        //   Test Expectations
        // =====================================================================
        Operation operation = new SetModelObjectOperation(
                internalProxyMock, NEW_MODEL_OBJECT);
        operation.execute();
        operation.undo();
    }

    /**
     * Test that executing then undoing then redoing the operation works
     * properly.
 
View Full Code Here

Examples of com.volantis.mcs.interaction.impl.operation.SetModelObjectOperation.undo()

        //   Test Expectations
        // =====================================================================
        Operation operation = new SetModelObjectOperation(
                internalProxyMock, NEW_MODEL_OBJECT);
        operation.execute();
        operation.undo();
        operation.redo();
    }

    /**
     * Test that executing then undoing then redoing then undoing the operation
View Full Code Here

Examples of com.volantis.mcs.interaction.impl.operation.SetModelObjectOperation.undo()

        //   Test Expectations
        // =====================================================================
        Operation operation = new SetModelObjectOperation(
                internalProxyMock, NEW_MODEL_OBJECT);
        operation.execute();
        operation.undo();
        operation.redo();
        operation.undo();
    }

    private void addUndoExpectations(final int startModificationCount) {
View Full Code Here

Examples of com.volantis.mcs.interaction.impl.operation.SetModelObjectOperation.undo()

        Operation operation = new SetModelObjectOperation(
                internalProxyMock, NEW_MODEL_OBJECT);
        operation.execute();
        operation.undo();
        operation.redo();
        operation.undo();
    }

    private void addUndoExpectations(final int startModificationCount) {
        internalProxyMock.expects.getModificationCount()
                .returns(startModificationCount);
View Full Code Here

Examples of gui.commands.Command.undo()

  public void undo() {
    if (doneCommands.size() > 0) {
      Command comm = doneCommands.pop();
     
      comm.undo();
     
      undoneCommands.push(comm);
    }
   
    ActionManager.getInstance().redoEnabled(true);
View Full Code Here

Examples of javax.swing.text.AbstractDocument.DefaultDocumentEvent.undo()

        assertTrue(edit.addEdit(insert));
        assertTrue(edit.addEdit(remove));
        assertEquals(2, getEdits(edit).size());
        // Stop collecting and make undo
        edit.end();
        edit.undo();
        // The document should be in its intial state
        assertEquals("", doc.getText(0, doc.getLength()));
    }

    private static HashMap<?, ?> getChanges(final DefaultDocumentEvent event) {
View Full Code Here

Examples of javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit.undo()

        assertSame(root.getElement(0).getElement(1), attrEdit.element);
        final Element leaf = root.getElement(0).getElement(1);
        assertEquals(attrs, leaf.getAttributes());
        doc.writeLock();
        try {
            attrEdit.undo();
        } finally {
            doc.writeUnlock();
        }
        assertEquals(SimpleAttributeSet.EMPTY, leaf.getAttributes());
    }
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.