Top Fields Constructors Methods
org.jabref.gui.undo

public Class CountingUndoManager

extends UndoManager
Class Inheritance
Imports
javax.swing.undo.CannotUndoException, .UndoManager, .UndoableEdit

Field Summary

Modifier and TypeField and Description
private int
private int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized boolean
addEdit(UndoableEdit
the edit to be added
edit
)

Overrides javax.swing.undo.UndoManager.addEdit.

Implements javax.swing.undo.UndoableEdit.addEdit.

Adds an UndoableEdit to this UndoManager, if it's possible.

public synchronized boolean
public synchronized void
public synchronized void
redo()

Overrides javax.swing.undo.UndoManager.redo.

Implements javax.swing.undo.UndoableEdit.redo.

Redoes the appropriate edits.

public synchronized void
undo()

Overrides javax.swing.undo.UndoManager.undo.

Implements javax.swing.undo.UndoableEdit.undo.

Undoes the appropriate edits.

Inherited from javax.swing.undo.UndoManager:
canRedocanUndocanUndoOrRedodiscardAllEditseditToBeRedoneeditToBeUndoneendgetLimitgetRedoPresentationNamegetUndoOrRedoPresentationNamegetUndoPresentationNameredoTosetLimittoStringtrimEditstrimForLimitundoableEditHappenedundoOrRedoundoTo

Field Detail

currentback to summary
private int current
unchangedPointback to summary
private int unchangedPoint

Constructor Detail

CountingUndoManagerback to summary
public CountingUndoManager()

Method Detail

addEditback to summary
public synchronized boolean addEdit(UndoableEdit edit)

Overrides javax.swing.undo.UndoManager.addEdit.

Implements javax.swing.undo.UndoableEdit.addEdit.

Doc from javax.swing.undo.UndoManager.addEdit.

Adds an UndoableEdit to this UndoManager, if it's possible. This removes all edits from the index of the next edit to the end of the edits list. If end has been invoked the edit is not added and false is returned. If end hasn't been invoked this returns true.

Parameters
edit:UndoableEdit

the edit to be added

Returns:boolean

true if anEdit can be incorporated into this edit

Annotations
@Override
hasChangedback to summary
public synchronized boolean hasChanged()
markUnchangedback to summary
public synchronized void markUnchanged()
redoback to summary
public synchronized void redo() throws CannotUndoException

Overrides javax.swing.undo.UndoManager.redo.

Implements javax.swing.undo.UndoableEdit.redo.

Doc from javax.swing.undo.UndoManager.redo.

Redoes the appropriate edits. If end has been invoked this calls through to the superclass. Otherwise this invokes redo on all edits between the index of the next edit and the next significant edit, updating the index of the next edit appropriately.

Annotations
@Override
undoback to summary
public synchronized void undo() throws CannotUndoException

Overrides javax.swing.undo.UndoManager.undo.

Implements javax.swing.undo.UndoableEdit.undo.

Doc from javax.swing.undo.UndoManager.undo.

Undoes the appropriate edits. If end has been invoked this calls through to the superclass, otherwise this invokes undo on all edits between the index of the next edit and the last significant edit, updating the index of the next edit appropriately.

Annotations
@Override
Exceptions
CannotUndoException:
if one of the edits throws CannotUndoException or there are no edits to be undone