1 package tim.prune.undo;
\r
3 import tim.prune.I18nManager;
\r
4 import tim.prune.UpdateMessageBroker;
\r
5 import tim.prune.data.Photo;
\r
6 import tim.prune.data.TrackInfo;
\r
9 * Operation to undo the rotation of a photo
\r
11 public class UndoRotatePhoto implements UndoOperation
\r
13 private Photo _photo = null;
\r
14 private boolean _rightwards = true;
\r
19 * @param inPhoto photo
\r
20 * @param inDir true if original operation was rightwards (clockwise) rotation
\r
22 public UndoRotatePhoto(Photo inPhoto, boolean inDir)
\r
25 _rightwards = inDir;
\r
30 * @return description of operation including photo name
\r
32 public String getDescription()
\r
34 return I18nManager.getText("undo.rotatephoto") + " " + _photo.getFile().getName();
\r
39 * Perform the undo operation on the given Track
\r
40 * @param inTrackInfo TrackInfo object on which to perform the operation
\r
42 public void performUndo(TrackInfo inTrackInfo) throws UndoException
\r
44 _photo.rotate(!_rightwards);
\r
45 // inform subscribers
\r
46 UpdateMessageBroker.informSubscribers();
\r