net.sf.bibkeeper.undo
public class: UndoablePreambleChange [javadoc |
source]
java.lang.Object
javax.swing.undo.AbstractUndoableEdit
net.sf.bibkeeper.undo.UndoablePreambleChange
All Implemented Interfaces:
UndoableEdit, Serializable
This class represents a change in any field value. The relevant
information is the BibtexEntry, the field name, the old and the
new value. Old/new values can be null.
| Methods from javax.swing.undo.AbstractUndoableEdit: |
|---|
|
addEdit, canRedo, canUndo, die, getPresentationName, getRedoPresentationName, getUndoPresentationName, isSignificant, redo, replaceEdit, toString, undo |
| Methods from java.lang.Object: |
|---|
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method from net.sf.bibkeeper.undo.UndoablePreambleChange Detail: |
public String getRedoPresentationName() {
return "Redo: change preamble";
}
|
public String getUndoPresentationName() {
return "Undo: change preamble";
}
|
public void redo() {
super.redo();
// Redo the change.
base.setPreamble(newValue);
// If the preamble editor is open, update it.
baseFrame.updatePreamble();
}
|
public void undo() {
super.undo();
// Revert the change.
base.setPreamble(oldValue);
// If the preamble editor is open, update it.
baseFrame.updatePreamble();
}
|