public class UndoHistory extends Object implements TreeModelListener, Serializable
Modifier and Type | Class and Description |
---|---|
static interface |
UndoHistory.HistoryListener
Interface to be implemented by components interested in UndoHistory
|
Constructor and Description |
---|
UndoHistory() |
Modifier and Type | Method and Description |
---|---|
void |
add(JMeterTreeModel treeModel,
String comment)
Add tree model copy to the history
|
boolean |
canRedo() |
boolean |
canUndo() |
void |
clear()
Clears the undo history
|
static boolean |
isEnabled() |
void |
redo() |
void |
registerHistoryListener(UndoHistory.HistoryListener listener)
Register HistoryListener
|
void |
treeNodesChanged(TreeModelEvent tme)
Record the changes in the node as the undo step
|
void |
treeNodesInserted(TreeModelEvent tme)
Record adding nodes as the undo step
|
void |
treeNodesRemoved(TreeModelEvent tme)
Record deleting nodes as the undo step
|
void |
treeStructureChanged(TreeModelEvent tme)
Record some other change
|
void |
undo() |
public void clear()
public void add(JMeterTreeModel treeModel, String comment)
This method relies on the rule that the record in history made AFTER change has been made to test plan
treeModel
- JMeterTreeModelcomment
- Stringpublic void undo()
public void redo()
public boolean canRedo()
public boolean canUndo()
public void treeNodesChanged(TreeModelEvent tme)
treeNodesChanged
in interface TreeModelListener
tme
- TreeModelEvent
with event detailspublic void treeNodesInserted(TreeModelEvent tme)
treeNodesInserted
in interface TreeModelListener
tme
- TreeModelEvent
with event detailspublic void treeNodesRemoved(TreeModelEvent tme)
treeNodesRemoved
in interface TreeModelListener
tme
- TreeModelEvent
with event detailspublic void treeStructureChanged(TreeModelEvent tme)
treeStructureChanged
in interface TreeModelListener
tme
- TreeModelEvent
with event detailspublic static boolean isEnabled()
public void registerHistoryListener(UndoHistory.HistoryListener listener)
listener
- to add to our listenersCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.