001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.actions.audio; 003 004import static org.openstreetmap.josm.tools.I18n.tr; 005import static org.openstreetmap.josm.tools.I18n.trc; 006 007import java.awt.event.ActionEvent; 008import java.awt.event.KeyEvent; 009 010import org.openstreetmap.josm.actions.JosmAction; 011import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer; 012import org.openstreetmap.josm.tools.Shortcut; 013 014/** 015 * Play the sound track from the Audio Marker after the one most recently played.<br> 016 * Play from the first such Marker if none has been played, or repeat the last marker if at the end. 017 * @since 547 018 */ 019public class AudioNextAction extends JosmAction { 020 021 /** 022 * Constructs a new {@code AudioNextAction}. 023 */ 024 public AudioNextAction() { 025 super(trc("audio", "Next Marker"), "audio-next", trc("audio", "Play next marker."), 026 Shortcut.registerShortcut("audio:next", tr("Audio: {0}", trc("audio", "Next Marker")), KeyEvent.VK_F8, Shortcut.DIRECT), true); 027 } 028 029 @Override 030 public void actionPerformed(ActionEvent e) { 031 MarkerLayer.playNextMarker(); 032 } 033}