Examples of canUndo()


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

    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.CompoundEdit.canUndo()

    edit.redo();
    harness.check(edit.canUndo());

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

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

    am.put("Undo", new AbstractAction() {
      @Override
      public void actionPerformed(ActionEvent e) {
        try {
          if (undoManager.canUndo()) {
            undoManager.undo();
          }
        } catch (CannotUndoException exp) {
          exp.printStackTrace();
        }
View Full Code Here

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

        final Action undoAction = new AbstractAction(UIMessages.instance.getString("GenericUndoName")) { //$NON-NLS-1$
            private static final long serialVersionUID = -2135822508998640523L;

                public void actionPerformed(ActionEvent e) {
                    try {
                        if (undoManager.canUndo()) {
                            undoManager.undo();
                        }
                    }
                    catch (CannotUndoException ex) {
                    }
View Full Code Here

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

        undoable = content.insertString(0, "012345");
        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();
        assertFalse(undoable.canRedo());
View Full Code Here

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

        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));
        assertFalse(undoable.addEdit(undoable));
View Full Code Here

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

    public void testRemove_WithValidValues() throws BadLocationException {
View Full Code Here

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

        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());
        assertTrue(undoable.canUndo());
View Full Code Here

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

        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();
        assertFalse(undoable.canRedo());
View Full Code Here

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

        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));
        assertFalse(undoable.addEdit(undoable));
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.