Top Fields Constructors Methods
org.jabref.gui.groups

public Class UndoableModifySubtree

extends AbstractUndoableJabRefEdit
Class Inheritance
Imports
java.util.ArrayList, .List, org.jabref.gui.undo.AbstractUndoableJabRefEdit, org.jabref.model.groups.GroupTreeNode

Field Summary

Modifier and TypeField and Description
private final GroupTreeNode
m_groupRoot

A backup of the groups before the modification

private final List<GroupTreeNode>
m_modifiedSubtree

This holds the new subtree (the root's modified children) to allow redo.

private final String
private final GroupTreeNode
private final List<Integer>
m_subtreeRootPath

The path to the global groups root node

Constructor Summary

AccessConstructor and Description
public
UndoableModifySubtree(GroupTreeNodeViewModel groupRoot, GroupTreeNodeViewModel
The root node of the subtree that was modified (this node may not be modified, it is just used as a convenience handle).
subtree
,
String name)

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

m_groupRootback to summary
private final GroupTreeNode m_groupRoot

A backup of the groups before the modification

m_modifiedSubtreeback to summary
private final List<GroupTreeNode> m_modifiedSubtree

This holds the new subtree (the root's modified children) to allow redo.

m_nameback to summary
private final String m_name
m_subtreeBackupback to summary
private final GroupTreeNode m_subtreeBackup
m_subtreeRootPathback to summary
private final List<Integer> m_subtreeRootPath

The path to the global groups root node

Constructor Detail

UndoableModifySubtreeback to summary
public UndoableModifySubtree(GroupTreeNodeViewModel groupRoot, GroupTreeNodeViewModel subtree, String name)
Parameters
subtree:GroupTreeNodeViewModel

The root node of the subtree that was modified (this node may not be modified, it is just used as a convenience handle).

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