Class UndoHistory

    • Constructor Detail

      • UndoHistory

        public UndoHistory()
    • Method Detail

      • clear

        public void clear()
        Clears the undo history
      • add

        public 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

        Parameters:
        treeModel - JMeterTreeModel
        comment - String
      • moveInHistory

        public void moveInHistory​(int offset,
                                  JMeterTreeModel acceptorModel)
        Goes through undo history, changing GUI
        Parameters:
        offset - the direction to go to, usually -1 for undo or 1 for redo
        acceptorModel - TreeModel to accept the changes
      • canRedo

        public boolean canRedo()
        Returns:
        true if remaing items
      • canUndo

        public boolean canUndo()
        Returns:
        true if not at first element
      • registerHistoryListener

        public void registerHistoryListener​(UndoHistory.HistoryListener listener)
        Register HistoryListener
        Parameters:
        listener - to add to our listeners