+ public void informDataLoaded(Field[] inFieldArray, Object[][] inDataArray,
+ PointCreateOptions inOptions, SourceInfo inSourceInfo, TrackNameList inTrackNameList)
+ {
+ // no link array given
+ informDataLoaded(inFieldArray, inDataArray, inOptions, inSourceInfo,
+ inTrackNameList, null);
+ }
+
+ /**
+ * Receive loaded data and determine whether to filter on tracks or not
+ * @param inFieldArray array of fields
+ * @param inDataArray array of data
+ * @param inOptions creation options such as units
+ * @param inSourceInfo information about the source of the data
+ * @param inTrackNameList information about the track names
+ * @param inLinkInfo links to photo/audio clips
+ */
+ public void informDataLoaded(Field[] inFieldArray, Object[][] inDataArray, PointCreateOptions inOptions,
+ SourceInfo inSourceInfo, TrackNameList inTrackNameList, MediaLinkInfo inLinkInfo)
+ {
+ // Check whether loaded array can be properly parsed into a Track
+ Track loadedTrack = new Track();
+ loadedTrack.load(inFieldArray, inDataArray, inOptions);
+ if (loadedTrack.getNumPoints() <= 0)
+ {
+ showErrorMessage("error.load.dialogtitle", "error.load.nopoints");
+ // load next file if there's a queue
+ loadNextFile();
+ return;
+ }
+ // Check for doubled track
+ if (Checker.isDoubledTrack(loadedTrack)) {
+ JOptionPane.showMessageDialog(_frame, I18nManager.getText("dialog.open.contentsdoubled"),
+ I18nManager.getText("function.open"), JOptionPane.WARNING_MESSAGE);
+ }
+
+ _busyLoading = true;
+ // Attach photos and/or audio clips to points
+ if (inLinkInfo != null)
+ {
+ String[] linkArray = inLinkInfo.getLinkArray();
+ if (linkArray != null) {
+ new AsyncMediaLoader(this, inLinkInfo.getZipFile(), linkArray, loadedTrack, inSourceInfo.getFile()).begin();
+ }
+ }
+ // Look at TrackNameList, decide whether to filter or not
+ if (inTrackNameList != null && inTrackNameList.getNumTracks() > 1)
+ {
+ // Launch a dialog to let the user choose which tracks to load, then continue
+ new SelectTracksFunction(this, loadedTrack, inSourceInfo, inTrackNameList).begin();
+ }
+ else {
+ // go directly to load
+ informDataLoaded(loadedTrack, inSourceInfo);
+ }
+ setCurrentMode(AppMode.NORMAL);
+ }
+
+
+ /**
+ * Receive loaded data and optionally merge with current Track
+ * @param inLoadedTrack loaded track
+ * @param inSourceInfo information about the source of the data
+ */
+ public void informDataLoaded(Track inLoadedTrack, SourceInfo inSourceInfo)