Changeset 1169 in josm for trunk/src/org/openstreetmap/josm/actions/audio/AudioFwdAction.java
- Timestamp:
- 2008-12-23T15:07:05+01:00 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/audio/AudioFwdAction.java
r1084 r1169 15 15 public class AudioFwdAction extends JosmAction { 16 16 17 17 private double amount; 18 18 19 20 21 22 23 24 25 26 27 19 public AudioFwdAction() { 20 super(tr("Forward"), "audio-fwd", tr("Jump forward"), 21 Shortcut.registerShortcut("audio:forward", tr("Audio: {0}", tr("Forward")), KeyEvent.VK_F7, Shortcut.GROUP_DIRECT), true); 22 try { 23 amount = Double.parseDouble(Main.pref.get("audio.forwardbackamount","10.0")); 24 } catch (NumberFormatException e) { 25 amount = 10.0; 26 } 27 } 28 28 29 30 31 32 33 34 35 36 37 38 29 public void actionPerformed(ActionEvent e) { 30 try { 31 if (AudioPlayer.playing() || AudioPlayer.paused()) 32 AudioPlayer.play(AudioPlayer.url(), AudioPlayer.position() + amount); 33 else 34 MarkerLayer.playAudio(); 35 } catch (Exception ex) { 36 AudioPlayer.audioMalfunction(ex); 37 } 38 } 39 39 }
Note:
See TracChangeset
for help on using the changeset viewer.