Top Fields Constructors Methods
org.jabref.gui.undo

public Class NamedCompound

extends CompoundEdit
Class Inheritance
Imports
javax.swing.undo.CompoundEdit, .UndoableEdit, org.jabref.logic.l10n.Localization

Field Summary

Modifier and TypeField and Description
private boolean
private final String
Inherited from javax.swing.undo.CompoundEdit:
edits

Constructor Summary

AccessConstructor and Description
public

Method Summary

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

Overrides javax.swing.undo.CompoundEdit.addEdit.

Implements javax.swing.undo.UndoableEdit.addEdit.

If this edit is inProgress, accepts anEdit and returns true.

public String
getPresentationName()

Overrides javax.swing.undo.CompoundEdit.getPresentationName.

Implements javax.swing.undo.UndoableEdit.getPresentationName.

Returns getPresentationName from the last UndoableEdit added to edits.

public String
getRedoPresentationName()

Overrides javax.swing.undo.CompoundEdit.getRedoPresentationName.

Implements javax.swing.undo.UndoableEdit.getRedoPresentationName.

Returns getRedoPresentationName from the last UndoableEdit added to edits.

public String
getUndoPresentationName()

Overrides javax.swing.undo.CompoundEdit.getUndoPresentationName.

Implements javax.swing.undo.UndoableEdit.getUndoPresentationName.

Returns getUndoPresentationName from the last UndoableEdit added to edits.

public boolean
Inherited from javax.swing.undo.CompoundEdit:
canRedocanUndodieendisInProgressisSignificantlastEditredotoStringundo

Field Detail

hasEditsback to summary
private boolean hasEdits
nameback to summary
private final String name

Constructor Detail

NamedCompoundback to summary
public NamedCompound(String name)

Method Detail

addEditback to summary
public boolean addEdit(UndoableEdit undoableEdit)

Overrides javax.swing.undo.CompoundEdit.addEdit.

Implements javax.swing.undo.UndoableEdit.addEdit.

Doc from javax.swing.undo.CompoundEdit.addEdit.

If this edit is inProgress, accepts anEdit and returns true.

The last edit added to this CompoundEdit is given a chance to addEdit(anEdit). If it refuses (returns false), anEdit is given a chance to replaceEdit the last edit. If anEdit returns false here, it is added to edits.

Parameters
undoableEdit:UndoableEdit

the edit to be added

Returns:boolean

true if the edit is inProgress; otherwise returns false

Annotations
@Override
getPresentationNameback to summary
public String getPresentationName()

Overrides javax.swing.undo.CompoundEdit.getPresentationName.

Implements javax.swing.undo.UndoableEdit.getPresentationName.

Doc from javax.swing.undo.CompoundEdit.getPresentationName.

Returns getPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.

Returns:String

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

the empty string ""

Annotations
@Override
getRedoPresentationNameback to summary
public String getRedoPresentationName()

Overrides javax.swing.undo.CompoundEdit.getRedoPresentationName.

Implements javax.swing.undo.UndoableEdit.getRedoPresentationName.

Doc from javax.swing.undo.CompoundEdit.getRedoPresentationName.

Returns getRedoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.

Returns:String

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

the value from the defaults table with key AbstractUndoableEdit.redoText, followed by a space, followed by getPresentationName unless getPresentationName is "" in which case, the defaults value is returned alone.

Annotations
@Override
getUndoPresentationNameback to summary
public String getUndoPresentationName()

Overrides javax.swing.undo.CompoundEdit.getUndoPresentationName.

Implements javax.swing.undo.UndoableEdit.getUndoPresentationName.

Doc from javax.swing.undo.CompoundEdit.getUndoPresentationName.

Returns getUndoPresentationName from the last UndoableEdit added to edits. If edits is empty, calls super.

Returns:String

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

the value from the defaults table with key AbstractUndoableEdit.undoText, followed by a space, followed by getPresentationName unless getPresentationName is "" in which case, the defaults value is returned alone.

Annotations
@Override
hasEditsback to summary
public boolean hasEdits()