Top Description Fields Constructors Methods
org.jabref.gui.undo

public Class UndoableRemoveEntries

extends AbstractUndoableJabRefEdit
Class Inheritance
Imports
java.util.Collections, .List, org.jabref.logic.l10n.Localization, org.jabref.model.database.BibDatabase, org.jabref.model.entry.BibEntry, org.jabref.model.entry.event.EntriesEventSource, org.jabref.model.strings.StringUtil, org.slf4j.Logger, .LoggerFactory

This class represents the removal of entries. The constructor needs references to the database, the entries, and the map of open entry editors. TODO is this map still being used? The latter to be able to close the entry's editor if it is opened after an undo, and the removal is then undone.

Field Summary

Modifier and TypeField and Description
private final BibDatabase
private final boolean
private final List<BibEntry>
private static final Logger

Constructor Summary

AccessConstructor and Description
public
public
public
UndoableRemoveEntries(BibDatabase base, List<BibEntry> entries, boolean cut)

Method Summary

Modifier and TypeMethod and Description
public String
public void
redo()

Overrides javax.swing.undo.AbstractUndoableEdit.redo.

Implements javax.swing.undo.UndoableEdit.redo.

Throws CannotRedoException if canRedo returns false.

public void
undo()

Overrides javax.swing.undo.AbstractUndoableEdit.undo.

Implements javax.swing.undo.UndoableEdit.undo.

Throws CannotUndoException if canUndo returns false.

Inherited from org.jabref.gui.undo.AbstractUndoableJabRefEdit:
getRedoPresentationNamegetUndoPresentationName

Field Detail

baseback to summary
private final BibDatabase base
cutback to summary
private final boolean cut
entriesback to summary
private final List<BibEntry> entries
LOGGERback to summary
private static final Logger LOGGER

Constructor Detail

UndoableRemoveEntriesback to summary
public UndoableRemoveEntries(BibDatabase base, BibEntry entry)
UndoableRemoveEntriesback to summary
public UndoableRemoveEntries(BibDatabase base, List<BibEntry> entries)
UndoableRemoveEntriesback to summary
public UndoableRemoveEntries(BibDatabase base, List<BibEntry> entries, boolean cut)

Method Detail

getPresentationNameback to summary
public String getPresentationName()

Overrides javax.swing.undo.AbstractUndoableEdit.getPresentationName.

Implements javax.swing.undo.UndoableEdit.getPresentationName.

Doc from javax.swing.undo.AbstractUndoableEdit.getPresentationName.

This default implementation returns "". Used by getUndoPresentationName and getRedoPresentationName to construct the strings they return. Subclasses should override to return an appropriate description of the operation this edit represents.

Returns:String

the empty string ""

Annotations
@Override
redoback to summary
public void redo()

Overrides javax.swing.undo.AbstractUndoableEdit.redo.

Implements javax.swing.undo.UndoableEdit.redo.

Doc from javax.swing.undo.AbstractUndoableEdit.redo.

Throws CannotRedoException if canRedo returns false. Sets hasBeenDone to true. Subclasses should override to redo the operation represented by this edit. Override should begin with a call to super.

Annotations
@Override
undoback to summary
public void undo()

Overrides javax.swing.undo.AbstractUndoableEdit.undo.

Implements javax.swing.undo.UndoableEdit.undo.

Doc from javax.swing.undo.AbstractUndoableEdit.undo.

Throws CannotUndoException if canUndo returns false. Sets hasBeenDone to false. Subclasses should override to undo the operation represented by this edit. Override should begin with a call to super.

Annotations
@Override