Package javax.swing.undo

Examples of javax.swing.undo.UndoableEdit.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


        final String redoName = isHarmony() ? "Redo deletion" : "Redo";
        final String undoName = isHarmony() ? "Undo deletion" : "Undo";
        assertEquals(redoName, undoable.getRedoPresentationName());
        assertEquals(undoName, undoable.getUndoPresentationName());
        assertTrue(undoable.isSignificant());
        assertFalse(undoable.canRedo());
        assertTrue(undoable.canUndo());
        assertEquals(redoName, undoable.getRedoPresentationName());
        assertEquals(undoName, undoable.getUndoPresentationName());
        assertTrue(undoable.isSignificant());
        assertFalse(undoable.canRedo());
View Full Code Here

        assertFalse(undoable.canRedo());
        assertTrue(undoable.canUndo());
        assertEquals(redoName, undoable.getRedoPresentationName());
        assertEquals(undoName, undoable.getUndoPresentationName());
        assertTrue(undoable.isSignificant());
        assertFalse(undoable.canRedo());
        assertTrue(undoable.canUndo());
        undoable.undo();
        assertTrue(undoable.canRedo());
        assertFalse(undoable.canUndo());
        undoable.redo();
View Full Code Here

        assertEquals(undoName, undoable.getUndoPresentationName());
        assertTrue(undoable.isSignificant());
        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));
View Full Code Here

        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

   * operation would be successful now for the given view, false otherwise
   */
  public synchronized boolean canRedo(Object source) {
    if (isInProgress()) {
      UndoableEdit edit = editToBeRedone(source);
      return edit != null && edit.canRedo();
    } else {
      return super.canRedo();
    }
  }

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.