Examples of redo()


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

    AbstractUndoableEdit aue = new AbstractUndoableEdit();
    aue.undo();
    aue.die();
    try
      {
        aue.redo();
        caught = null;
      }
    catch (Exception ex)
      {
        caught = ex;
View Full Code Here

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

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

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

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

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

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

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

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

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

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

    // Check #4.
    edit.redo();
    harness.check(edit.canUndo());

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

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

    // 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.redo()

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

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

    // Check home doesn't contain any wall
    assertHomeContains(home);
   
    // 11. Redo 8 times
    for (int i = 0; i < 6; i++) {
      undoManager.redo();
    }
    // Check plan contains the four wall
    assertHomeContains(home, wall1, wall2, wall3, wall4);
    // Check the second and the third wall are selected
    assertSelectionContains(home, wall2, wall3);
View Full Code Here

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

        UndoableEdit ue = content.remove(3, 8);
        Position pos = content.createPosition(3);
        assertEquals(3, pos.getOffset());
        ue.undo();
        assertEquals(11, pos.getOffset());
        ue.redo();
        assertEquals(3, pos.getOffset());
    }

    public void testCreatePositionAfterUndone() throws BadLocationException {
        UndoableEdit ue = content.remove(3, 8);
View Full Code Here

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

    public void testCreatePositionAfterUndone() throws BadLocationException {
        UndoableEdit ue = content.remove(3, 8);
        ue.undo();
        Position pos = content.createPosition(5);
        assertEquals(5, pos.getOffset());
        ue.redo();
        assertEquals(3, pos.getOffset());
        ue.undo();
        assertEquals(5, pos.getOffset());
    }
View Full Code Here

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

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

    public static int getIndex(final Position pos) {
        try {
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.