Class ImportAudioAction
- java.lang.Object
-
- javax.swing.AbstractAction
-
- org.openstreetmap.josm.gui.layer.gpx.ImportAudioAction
-
- All Implemented Interfaces:
java.awt.event.ActionListener
,java.io.Serializable
,java.lang.Cloneable
,java.util.EventListener
,javax.swing.Action
public class ImportAudioAction extends javax.swing.AbstractAction
Import audio files into a GPX layer to enable audio playback functions.- Since:
- 5715
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ImportAudioAction.AudioFileFilter
Audio file filter.private static class
ImportAudioAction.Markers
-
Constructor Summary
Constructors Constructor Description ImportAudioAction(GpxLayer layer)
Constructs a newImportAudioAction
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent e)
private void
importAudio(java.io.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.private static void
warnCantImportIntoServerLayer(GpxLayer layer)
-
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
-
-
-
Constructor Detail
-
ImportAudioAction
public ImportAudioAction(GpxLayer layer)
Constructs a newImportAudioAction
.- Parameters:
layer
- The associated GPX layer
-
-
Method Detail
-
warnCantImportIntoServerLayer
private static void warnCantImportIntoServerLayer(GpxLayer layer)
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
-
importAudio
private void importAudio(java.io.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 layerml
- marker layerfirstStartTime
- first start time in milliseconds, used for (d)markers
- keeps track of warning messages to avoid repeated warnings
-
-