source: josm/trunk/src/org/openstreetmap/josm/actions/audio/AudioNextAction.java@ 12879

Last change on this file since 12879 was 12565, checked in by Don-vip, 7 years ago

fix #15110 - Disable audio actions when no audio is present (patch by bafonins, modified)

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.actions.audio;
3
4import static org.openstreetmap.josm.tools.I18n.tr;
5import static org.openstreetmap.josm.tools.I18n.trc;
6
7import java.awt.event.ActionEvent;
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
11import org.openstreetmap.josm.tools.Shortcut;
12
13/**
14 * Play the sound track from the Audio Marker after the one most recently played.<br>
15 * Play from the first such Marker if none has been played, or repeat the last marker if at the end.
16 * @since 547
17 */
18public class AudioNextAction extends AbstractAudioAction {
19
20 /**
21 * Constructs a new {@code AudioNextAction}.
22 */
23 public AudioNextAction() {
24 super(trc("audio", "Next Marker"), "audio-next", trc("audio", "Play next marker."),
25 Shortcut.registerShortcut("audio:next", tr("Audio: {0}", trc("audio", "Next Marker")), KeyEvent.VK_F8, Shortcut.DIRECT), true);
26 }
27
28 @Override
29 public void actionPerformed(ActionEvent e) {
30 MarkerLayer.playNextMarker();
31 }
32}
Note: See TracBrowser for help on using the repository browser.