Class ImportAudioAction
java.lang.Object
javax.swing.AbstractAction
org.openstreetmap.josm.gui.layer.gpx.ImportAudioAction
- All Implemented Interfaces:
ActionListener,Serializable,Cloneable,EventListener,Action
Import audio files into a GPX layer to enable audio playback functions.
- Since:
- 5715
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAudio file filter.private static final class -
Field Summary
FieldsFields inherited from class javax.swing.AbstractAction
changeSupport, enabledFields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprivate voidimportAudio(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 voidMethods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
-
Field Details
-
layer
-
-
Constructor Details
-
ImportAudioAction
Constructs a newImportAudioAction.- Parameters:
layer- The associated GPX layer
-
-
Method Details
-
warnCantImportIntoServerLayer
-
actionPerformed
-
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 layerml- marker layerfirstStartTime- first start time in milliseconds, used for (d)markers- keeps track of warning messages to avoid repeated warnings
-