1 package tim.prune.undo;
3 import tim.prune.I18nManager;
4 import tim.prune.data.TrackInfo;
7 * Undo reversal of track section
9 public class UndoReverseSection implements UndoOperation
11 private int _startIndex, _endIndex;
16 * @param inStart start index of section
17 * @param inEnd end index of section
19 public UndoReverseSection(int inStart, int inEnd)
21 _startIndex = inStart;
27 * @return description of operation
29 public String getDescription()
31 return I18nManager.getText("undo.reverse");
36 * Perform the undo operation on the given Track
37 * @param inTrackInfo TrackInfo object on which to perform the operation
39 public void performUndo(TrackInfo inTrackInfo) throws UndoException
41 if (!inTrackInfo.getTrack().reverseRange(_startIndex, _endIndex))
43 throw new UndoException(getDescription());