source: josm/trunk/src/org/openstreetmap/josm/actions/audio/AudioPrevAction.java@ 14397

Last change on this file since 14397 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
RevLine 
[6380]1// License: GPL. For details, see LICENSE file.
[626]2package org.openstreetmap.josm.actions.audio;
3
[582]4import static org.openstreetmap.josm.tools.I18n.tr;
[2842]5import static org.openstreetmap.josm.tools.I18n.trc;
[582]6
7import java.awt.event.ActionEvent;
8import java.awt.event.KeyEvent;
9
10import org.openstreetmap.josm.gui.layer.markerlayer.MarkerLayer;
[1084]11import org.openstreetmap.josm.tools.Shortcut;
[626]12
[5871]13/**
[6830]14 * Play the sound track from the Audio Marker before the one most recently played.<br>
[6069]15 * Play from the first such Marker if none has been played or already at the first marker.
[5871]16 * @since 547
17 */
[12565]18public class AudioPrevAction extends AbstractAudioAction {
[626]19
[5871]20 /**
21 * Constructs a new {@code AudioPrevAction}.
22 */
[1169]23 public AudioPrevAction() {
[2857]24 super(trc("audio", "Previous Marker"), "audio-prev", trc("audio", "Play previous marker."),
[4982]25 Shortcut.registerShortcut("audio:prev", tr("Audio: {0}", trc("audio", "Previous Marker")), KeyEvent.VK_F5, Shortcut.DIRECT), true);
[1169]26 }
[626]27
[6084]28 @Override
[1169]29 public void actionPerformed(ActionEvent e) {
30 MarkerLayer.playPreviousMarker();
31 }
[626]32}
Note: See TracBrowser for help on using the repository browser.