Layered the way JabRef layers preferences — org. to
GuiPreferences, JabRefCliPreferences to JabRefGuiPreferences. UndoManager in jablib
is the recording half that the ~118 classes editing the library depend on; this adds what
only the undo UI needs, so a class's declared type still says what it does with the journal.
The control methods are declared here rather than inherited because an interface cannot
inherit from a class: org. already implements every one
of them, and JabRefGuiUndoManager brings the two together.
| Modifier and Type | Method and Description |
|---|---|
| public void | addListener(Runnable listener)
Notified after every change to either stack, from whichever thread made it. |
| public boolean | |
| public boolean | |
| public void | |
| public ReadOnlyBooleanProperty | |
| public boolean | |
| public void | |
| public Optional | |
| public ReadOnlyBooleanProperty | |
| public Optional | suspendedBy()
The command currently applying changes to this library that are not yet on the stack, if
one is — the reading end of |
| public Optional | |
| public ReadOnlyBooleanProperty |
| addListener | back to summary |
|---|---|
| public void addListener(Runnable listener) Notified after every change to either stack, from whichever thread made it. | |
| canRedo | back to summary |
|---|---|
| public boolean canRedo() | |
| canUndo | back to summary |
|---|---|
| public boolean canUndo() | |
| clear | back to summary |
|---|---|
| public void clear() Discards both stacks and the saved position. Nothing calls this today, which is a defect rather than a spare method: closing a library leaves its changes on the stack, so a later undo re-applies them against a database that is gone, and the entries they hold stay alive for the session. Calling it on close needs the journal to belong to a library first — one journal currently serves them all. | |
| hasChangedProperty | back to summary |
|---|---|
| public ReadOnlyBooleanProperty hasChangedProperty() Whether the library differs from the last saved position. | |
| isApplying | back to summary |
|---|---|
| public boolean isApplying() | |
| markUnchanged | back to summary |
|---|---|
| public void markUnchanged() Marks the current position as saved. | |
| redo | back to summary |
|---|---|
| public Optional Re-applies the change last undone. | |
| redoableProperty | back to summary |
|---|---|
| public ReadOnlyBooleanProperty redoableProperty() Whether there is anything to redo. | |
| suspendedBy | back to summary |
|---|---|
| public Optional The command currently applying changes to this library that are not yet on the stack, if
one is — the reading end of | |
| undo | back to summary |
|---|---|
| public Optional Reverses the change on top of the undo stack. | |
| undoableProperty | back to summary |
|---|---|
| public ReadOnlyBooleanProperty undoableProperty() Whether there is anything to undo, for binding menu and toolbar enablement. | |