X-Git-Url: https://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fdata%2FTrackInfo.java;h=4695d351e6c124c398e0df90c911dbe0583c4dbe;hp=71363dae1053ed3e89dba907a8dea89adfada90f;hb=d3679d647d57c2ee7376ddbf6def2d5b23c04307;hpb=312fec956e43f5d0a38617da5d0add9c62563e2c diff --git a/tim/prune/data/TrackInfo.java b/tim/prune/data/TrackInfo.java index 71363da..4695d35 100644 --- a/tim/prune/data/TrackInfo.java +++ b/tim/prune/data/TrackInfo.java @@ -1,5 +1,7 @@ package tim.prune.data; +import java.util.List; + import tim.prune.UpdateMessageBroker; /** @@ -12,6 +14,9 @@ public class TrackInfo private Track _track = null; private Selection _selection = null; private FileInfo _fileInfo = null; + // TODO: How to store photos? In separate list to be maintained or dynamic? Only store pointless photos? + private PhotoList _photoList = null; + /** * Constructor @@ -24,6 +29,7 @@ public class TrackInfo _track = inTrack; _selection = new Selection(_track, inBroker); _fileInfo = new FileInfo(); + _photoList = new PhotoList(); } @@ -53,6 +59,14 @@ public class TrackInfo return _fileInfo; } + /** + * @return the PhotoList object + */ + public PhotoList getPhotoList() + { + return _photoList; + } + /** * Get the currently selected point, if any * @return DataPoint if single point selected, otherwise null @@ -77,12 +91,63 @@ public class TrackInfo } + /** + * Add a List of Photos + * @param inList List containing Photo objects + * @return number of photos added + */ + public int addPhotos(List inList) + { + // Firstly count number to add to make array + int numPhotosToAdd = 0; + if (inList != null && !inList.isEmpty()) + { + for (int i=0; i 0) + { + DataPoint[] dataPoints = new DataPoint[numPhotosToAdd]; + int pointNum = 0; + // Add each Photo in turn + for (int i=0; i