/** * {@inheritDoc} */ @Override public void redo() { super.redo(); updateActions(); }
/** * {@inheritDoc} */ @Override public void undo() { super.undo(); updateActions(); }
/** * Ends an "atomic" edit. * * @see #beginInternalAtomicEdit() */ public void endInternalAtomicEdit() { if (internalAtomicEditDepth>0 && --internalAtomicEditDepth==0) { addEdit(compoundEdit); compoundEdit.end(); compoundEdit = null; updateActions(); // Needed to show the new display name. } }
@Override public void focusGained(FocusEvent e) { Caret c = getCaret(); boolean enabled = c.getDot()!=c.getMark(); cutAction.setEnabled(enabled); copyAction.setEnabled(enabled); undoManager.updateActions(); // To reflect this text area. }
/** * Removes all undoable edits from this document's undo manager. This * method also makes the undo/redo actions disabled. */ /* * NOTE: For some reason, it appears I have to create an entirely new * <code>undoManager</code> for undo/redo to continue functioning * properly; if I don't, it only ever lets you do one undo. Not * too sure why this is... */ public void discardAllEdits() { undoManager.discardAllEdits(); getDocument().removeUndoableEditListener(undoManager); undoManager = createUndoManager(); getDocument().addUndoableEditListener(undoManager); undoManager.updateActions(); }
/** * {@inheritDoc} */ @Override public void redo() { super.redo(); updateActions(); }
/** * {@inheritDoc} */ public void undo() throws CannotUndoException { super.undo(); updateActions(); }
/** * {@inheritDoc} */ public void redo() throws CannotRedoException { super.redo(); updateActions(); }
/** * {@inheritDoc} */ public void undo() throws CannotUndoException { super.undo(); updateActions(); }
/** * {@inheritDoc} */ @Override public void undo() { super.undo(); updateActions(); }
/** * {@inheritDoc} */ public void redo() throws CannotRedoException { super.redo(); updateActions(); }
/** * Ends an "atomic" edit. * * @see #beginInternalAtomicEdit() */ public void endInternalAtomicEdit() { if (internalAtomicEditDepth>0 && --internalAtomicEditDepth==0) { addEdit(compoundEdit); compoundEdit.end(); compoundEdit = null; updateActions(); // Needed to show the new display name. } }
/** * Ends an "atomic" edit. * * @see #beginInternalAtomicEdit() */ public void endInternalAtomicEdit() { if (internalAtomicEditDepth>0 && --internalAtomicEditDepth==0) { addEdit(compoundEdit); compoundEdit.end(); compoundEdit = null; updateActions(); // Needed to show the new display name. } }
/** * Ends an "atomic" edit. * * @see #beginInternalAtomicEdit() */ public void endInternalAtomicEdit() { if (internalAtomicEditDepth>0 && --internalAtomicEditDepth==0) { addEdit(compoundEdit); compoundEdit.end(); compoundEdit = null; updateActions(); // Needed to show the new display name. } }
public void focusGained(FocusEvent e) { Caret c = getCaret(); boolean enabled = c.getDot()!=c.getMark(); cutAction.setEnabled(enabled); copyAction.setEnabled(enabled); undoManager.updateActions(); // To reflect this text area. }
@Override public void focusGained(FocusEvent e) { Caret c = getCaret(); boolean enabled = c.getDot()!=c.getMark(); cutAction.setEnabled(enabled); copyAction.setEnabled(enabled); undoManager.updateActions(); // To reflect this text area. }
public void focusGained(FocusEvent e) { Caret c = getCaret(); boolean enabled = c.getDot()!=c.getMark(); cutAction.setEnabled(enabled); copyAction.setEnabled(enabled); undoManager.updateActions(); // To reflect this text area. }
/** * Removes all undoable edits from this document's undo manager. This * method also makes the undo/redo actions disabled. */ /* * NOTE: For some reason, it appears I have to create an entirely new * <code>undoManager</code> for undo/redo to continue functioning * properly; if I don't, it only ever lets you do one undo. Not * too sure why this is... */ public void discardAllEdits() { undoManager.discardAllEdits(); getDocument().removeUndoableEditListener(undoManager); undoManager = new RUndoManager(this); getDocument().addUndoableEditListener(undoManager); undoManager.updateActions(); }
/** * Removes all undoable edits from this document's undo manager. This * method also makes the undo/redo actions disabled. */ /* * NOTE: For some reason, it appears I have to create an entirely new * <code>undoManager</code> for undo/redo to continue functioning * properly; if I don't, it only ever lets you do one undo. Not * too sure why this is... */ public void discardAllEdits() { undoManager.discardAllEdits(); getDocument().removeUndoableEditListener(undoManager); undoManager = new RUndoManager(this); getDocument().addUndoableEditListener(undoManager); undoManager.updateActions(); }