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
This method relies on the rule that the record in history made AFTER
change has been made to test plan
|
boolean |
canRedo() |
boolean |
canUndo() |
void |
clear()
Clears the undo history
|
void |
moveInHistory(int offset,
JMeterTreeModel acceptorModel)
Goes through undo history, changing GUI
|
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
|
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 moveInHistory(int offset,
JMeterTreeModel acceptorModel)
offset - the direction to go to, usually -1 for undo or 1 for redoacceptorModel - TreeModel to accept the changespublic boolean canRedo()
public boolean canUndo()
public void treeNodesChanged(TreeModelEvent tme)
treeNodesChanged in interface TreeModelListenertme - TreeModelEvent with event detailspublic void treeNodesInserted(TreeModelEvent tme)
treeNodesInserted in interface TreeModelListenertme - TreeModelEvent with event detailspublic void treeNodesRemoved(TreeModelEvent tme)
treeNodesRemoved in interface TreeModelListenertme - TreeModelEvent with event detailspublic void treeStructureChanged(TreeModelEvent tme)
treeStructureChanged in interface TreeModelListenertme - TreeModelEvent with event detailspublic void registerHistoryListener(UndoHistory.HistoryListener listener)
listener - to add to our listenersCopyright © 1998-2016 Apache Software Foundation. All Rights Reserved.