Class ImportAudioAction

java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.gui.layer.gpx.ImportAudioAction
All Implemented Interfaces:
ActionListener, Serializable, Cloneable, EventListener, Action

public class ImportAudioAction extends AbstractAction
Import audio files into a GPX layer to enable audio playback functions.
Since:
5715
See Also:
  • Field Details

  • Constructor Details

    • ImportAudioAction

      public ImportAudioAction(GpxLayer layer)
      Constructs a new ImportAudioAction.
      Parameters:
      layer - The associated GPX layer
  • Method Details

    • warnCantImportIntoServerLayer

      private static void warnCantImportIntoServerLayer(GpxLayer layer)
    • actionPerformed

      public void actionPerformed(ActionEvent e)
    • importAudio

      private void importAudio(File audioFile, MarkerLayer ml, double firstStartTime, ImportAudioAction.Markers markers)
      Makes a new marker layer derived from this GpxLayer containing at least one audio marker which the given audio file is associated with. Markers are derived from the following (a) explicit waypoints in the GPX layer, or (b) named trackpoints in the GPX layer, or (d) timestamp on the audio file (e) (in future) voice recognised markers in the sound recording (f) a single marker at the beginning of the track
      Parameters:
      audioFile - the file to be associated with the markers in the new marker layer
      ml - marker layer
      firstStartTime - first start time in milliseconds, used for (d)
      markers - keeps track of warning messages to avoid repeated warnings