Changeset 8510 in josm for trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
- Timestamp:
- 2015-06-20T23:42:21+02:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/PlayHeadMarker.java
r8444 r8510 61 61 62 62 private PlayHeadMarker() { 63 super(new LatLon(0.0, 0.0), "",63 super(new LatLon(0.0, 0.0), "", 64 64 Main.pref.get("marker.audiotracericon", "audio-tracer"), 65 65 null, -1.0, 0.0); … … 85 85 } 86 86 87 @Override public boolean containsPoint(Point p) { 87 @Override 88 public boolean containsPoint(Point p) { 88 89 Point screen = Main.map.mapView.getPoint(getEastNorth()); 89 90 Rectangle r = new Rectangle(screen.x, screen.y, symbol.getIconWidth(), … … 102 103 wasPlaying = AudioPlayer.playing(); 103 104 if (wasPlaying) { 104 try { AudioPlayer.pause(); 105 } catch (Exception ex) { AudioPlayer.audioMalfunction(ex);} 105 try { 106 AudioPlayer.pause(); 107 } catch (Exception ex) { 108 AudioPlayer.audioMalfunction(ex); 109 } 106 110 } 107 111 } … … 112 116 private void endDrag(boolean reset) { 113 117 if (!wasPlaying || reset) { 114 try { AudioPlayer.pause(); 115 } catch (Exception ex) { AudioPlayer.audioMalfunction(ex);} 118 try { 119 AudioPlayer.pause(); 120 } catch (Exception ex) { 121 AudioPlayer.audioMalfunction(ex); 122 } 116 123 } 117 124 if (reset) { … … 168 175 JOptionPane.showMessageDialog( 169 176 Main.parent, 170 tr("You need to drag the play head near to the GPX track whose associated sound track you were playing (after the first marker)."), 177 tr("You need to drag the play head near to the GPX track " + 178 "whose associated sound track you were playing (after the first marker)."), 171 179 tr("Warning"), 172 180 JOptionPane.WARNING_MESSAGE … … 191 199 public void synchronize(EastNorth en) { 192 200 AudioMarker recent = AudioMarker.recentlyPlayedMarker(); 193 if (recent == null)201 if (recent == null) 194 202 return; 195 203 /* First, see if we dropped onto an existing audio marker in the layer being played */ … … 234 242 235 243 /* Actually do the synchronization */ 236 if (ca == null) {244 if (ca == null) { 237 245 JOptionPane.showMessageDialog( 238 246 Main.parent, … … 281 289 if (timer == null) { 282 290 animationInterval = Main.pref.getDouble("marker.audioanimationinterval", 1.0); //milliseconds 283 timer = new Timer((int) (animationInterval * 1000.0), new ActionListener() {291 timer = new Timer((int) (animationInterval * 1000.0), new ActionListener() { 284 292 @Override 285 293 public void actionPerformed(ActionEvent e) {
Note:
See TracChangeset
for help on using the changeset viewer.