Examples of undo()


Examples of javax.swing.undo.AbstractUndoableEdit.undo()

    // Check #1.
    harness.check(!edit.canRedo());

    // Check #2.
    edit.undo();
    harness.check(edit.canRedo());

    // Check #3.
    edit.redo();
    harness.check(!edit.canRedo());
View Full Code Here

Examples of javax.swing.undo.AbstractUndoableEdit.undo()

    // Check #3.
    edit.redo();
    harness.check(!edit.canRedo());

    // Check #4.
    edit.undo();
    harness.check(edit.canRedo());

    // Check #5.
    edit.die();
    harness.check(!edit.canRedo());
View Full Code Here

Examples of javax.swing.undo.AbstractUndoableEdit.undo()

    // Check #3: Exception for dead edit.
    AbstractUndoableEdit aue = new AbstractUndoableEdit();
    aue.die();
    try
      {
        aue.undo();
        caught = null;
      }
    catch (Exception ex)
      {
        caught = ex;
View Full Code Here

Examples of javax.swing.undo.AbstractUndoableEdit.undo()

      }
    harness.check(caught instanceof CannotRedoException);

    // Check #3: Exception for dead edit.
    AbstractUndoableEdit aue = new AbstractUndoableEdit();
    aue.undo();
    aue.die();
    try
      {
        aue.redo();
        caught = null;
View Full Code Here

Examples of javax.swing.undo.AbstractUndoableEdit.undo()

    // Check #1.
    harness.check(edit.canUndo());  

    // Check #2.
    edit.undo();
    harness.check(!edit.canUndo());

    // Check #3.
    edit.redo();
    harness.check(edit.canUndo());
View Full Code Here

Examples of javax.swing.undo.CompoundEdit.undo()

    // Check #2.
    edit.end();
    harness.check(!edit.canRedo());

    // Check #3.
    edit.undo();
    harness.check(edit.canRedo());

    // Check #4.
    edit.redo();
    harness.check(!edit.canRedo());
View Full Code Here

Examples of javax.swing.undo.CompoundEdit.undo()

    // Check #2.
    edit.end();
    harness.check(edit.canUndo());

    // Check #3.
    edit.undo();
    harness.check(!edit.canUndo());

    // Check #4.
    edit.redo();
    harness.check(edit.canUndo());
View Full Code Here

Examples of javax.swing.undo.StateEdit.undo()

    p.setName("Rose Rosenholz");
    edit.end();
    harness.check(p.getName(), "Rose Rosenholz");

    // Check #3.
    edit.undo();
    harness.check(p.getName(), "Daniel Dandelion");

    // Check #4.
    edit.redo();
    harness.check(p.getName(), "Rose Rosenholz");
View Full Code Here

Examples of javax.swing.undo.UndoManager.undo()

      // Create an undo button
      this.undoButton = new JButton(new ImageIcon(
          getClass().getResource("resources/Undo16.gif")));
      this.undoButton.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent ev) {
          undoManager.undo();
        }
      });
      // Create a redo button
      this.redoButton = new JButton(new ImageIcon(
          getClass().getResource("resources/Redo16.gif")));
View Full Code Here

Examples of javax.swing.undo.UndoManager.undo()

    // Check the wall didn't move at end
    assertCoordinatesEqualWallPoints(20, 20, 504, 20, wall1);

    // 10. Undo 8 times
    for (int i = 0; i < 6; i++) {
      undoManager.undo();
    }
    // Check home doesn't contain any wall
    assertHomeContains(home);
   
    // 11. Redo 8 times
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.