]> gitweb.fperrin.net Git - GpsPrune.git/blobdiff - tim/prune/data/FileInfo.java
Version 17, September 2014
[GpsPrune.git] / tim / prune / data / FileInfo.java
index 1fd56b94b76aca28739c809bb11f3f78d48ce77f..ffcc95b04bcd2a5e7b34bb5fe0ad73eb973eac7b 100644 (file)
@@ -81,6 +81,21 @@ public class FileInfo
                return _sources.get(inIndex);
        }
 
+       /**
+        * Get the SourceInfo object (if any) for the given point
+        * @param inPoint point object
+        * @return SourceInfo object if there is one, otherwise null
+        */
+       public SourceInfo getSourceForPoint(DataPoint inPoint)
+       {
+               for (SourceInfo source : _sources) {
+                       if (source.getIndex(inPoint) >= 0) {
+                               return source;
+                       }
+               }
+               return null;
+       }
+
        /**
         * Clone contents of file info
         */