1 package tim.prune.save;
3 import tim.prune.I18nManager;
4 import tim.prune.data.Photo;
5 import tim.prune.data.PhotoStatus;
8 * Class to represent a row of the photo table for saving exif
10 public class PhotoTableEntry
12 private Photo _photo = null;
13 private String _photoName = null;
14 private boolean _save = true;
15 private String _status = null;
19 * @param inPhoto photo object
21 public PhotoTableEntry(Photo inPhoto)
26 _photoName = inPhoto.getFile().getName();
27 _status = getStatusString(inPhoto.getOriginalStatus(), inPhoto.getCurrentStatus());
33 * Make a status string from the given status bytes
34 * @param inOriginalStatus original status of photo
35 * @param inCurrentStatus current status of photo
36 * @return status string for display
38 private static String getStatusString (byte inOriginalStatus, byte inCurrentStatus)
40 if (inOriginalStatus != inCurrentStatus)
42 if (inOriginalStatus == PhotoStatus.NOT_CONNECTED)
44 // originally didn't have a point, now it has
45 return I18nManager.getText("dialog.saveexif.photostatus.connected");
47 if (inCurrentStatus == PhotoStatus.NOT_CONNECTED)
49 // originally had a point, now it doesn't
50 return I18nManager.getText("dialog.saveexif.photostatus.disconnected");
52 // originally had a point, now it has a different one
53 return I18nManager.getText("dialog.saveexif.photostatus.modified");
55 // unrecognised status
60 * @return Photo object
62 public Photo getPhoto()
68 * @return photo filename
70 public String getName()
76 * @return photo status as string
78 public String getStatus()
84 * @param inFlag true to save exif, false otherwise
86 public void setSaveFlag(boolean inFlag)
92 * @return true to save exif, false otherwise
94 public boolean getSaveFlag()