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

public Class UndoableInsertEntries

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.strings.StringUtil, org.slf4j.Logger, .LoggerFactory

This class represents the removal of entries. The constructor needs references to the database, entries, and a boolean marked true if the undo is from a call to paste().

Field Summary

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

Constructor Summary

AccessConstructor and Description
public
public
public
UndoableInsertEntries(BibDatabase database, List<BibEntry> entries, boolean paste)

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

databaseback to summary
private final BibDatabase database
entriesback to summary
private final List<BibEntry> entries
LOGGERback to summary
private static final Logger LOGGER
pasteback to summary
private final boolean paste

Constructor Detail

UndoableInsertEntriesback to summary
public UndoableInsertEntries(BibDatabase database, BibEntry entry)
UndoableInsertEntriesback to summary
public UndoableInsertEntries(BibDatabase database, List<BibEntry> entries)
UndoableInsertEntriesback to summary
public UndoableInsertEntries(BibDatabase database, List<BibEntry> entries, boolean paste)

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