1 package tim.prune.undo;
\r
3 import tim.prune.I18nManager;
\r
4 import tim.prune.data.DataPoint;
\r
5 import tim.prune.data.Track;
\r
6 import tim.prune.data.TrackInfo;
\r
9 * Operation to undo a waypoint rearrangement
\r
11 public class UndoRearrangeWaypoints implements UndoOperation
\r
13 private DataPoint[] _contents = null;
\r
18 * @param inTrack track contents to copy
\r
20 public UndoRearrangeWaypoints(Track inTrack)
\r
22 _contents = inTrack.cloneContents();
\r
27 * @return description of operation
\r
29 public String getDescription()
\r
31 return I18nManager.getText("undo.rearrangewaypoints");
\r
36 * Perform the undo operation on the given Track
\r
37 * @param inTrackInfo TrackInfo object on which to perform the operation
\r
39 public void performUndo(TrackInfo inTrackInfo) throws UndoException
\r
41 // restore track to previous values
\r
42 inTrackInfo.getTrack().replaceContents(_contents);
\r