1 package tim.prune.save;
3 import tim.prune.I18nManager;
4 import tim.prune.data.Photo;
7 * Class to represent a row of the photo table for saving exif
9 public class PhotoTableEntry
11 private Photo _photo = null;
12 private String _photoName = null;
13 private boolean _save = true;
14 private String _status = null;
18 * @param inPhoto photo object
20 public PhotoTableEntry(Photo inPhoto)
25 _photoName = inPhoto.getFile().getName();
26 _status = getStatusString(inPhoto.getOriginalStatus(), inPhoto.getCurrentStatus());
32 * Make a status string from the given status bytes
33 * @param inOriginalStatus original status of photo
34 * @param inCurrentStatus current status of photo
35 * @return status string for display
37 private static String getStatusString (Photo.Status inOriginalStatus, Photo.Status inCurrentStatus)
39 if (inOriginalStatus != inCurrentStatus)
41 if (inOriginalStatus == Photo.Status.NOT_CONNECTED)
43 // originally didn't have a point, now it has
44 return I18nManager.getText("dialog.saveexif.photostatus.connected");
46 if (inCurrentStatus == Photo.Status.NOT_CONNECTED)
48 // originally had a point, now it doesn't
49 return I18nManager.getText("dialog.saveexif.photostatus.disconnected");
51 // originally had a point, now it has a different one
52 return I18nManager.getText("dialog.saveexif.photostatus.modified");
54 // unrecognised status
59 * @return Photo object
61 public Photo getPhoto()
67 * @return photo filename
69 public String getName()
75 * @return photo status as string
77 public String getStatus()
83 * @param inFlag true to save exif, false otherwise
85 public void setSaveFlag(boolean inFlag)
91 * @return true to save exif, false otherwise
93 public boolean getSaveFlag()