Changeset 32513 in osm for applications
- Timestamp:
- 2016-07-02T00:12:58+02:00 (9 years ago)
- Location:
- applications/editors/josm/plugins/videomapping
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/videomapping/build.xml
r31923 r32513 5 5 <property name="commit.message" value="fix after JOSM update"/> 6 6 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 7 <property name="plugin.main.version" value=" 7001"/>7 <property name="plugin.main.version" value="10279"/> 8 8 <property name="plugin.author" value="Matthias Meißer"/> 9 9 <property name="plugin.class" value="org.openstreetmap.josm.plugins.videomapping.VideoPlugin"/> -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoObserver.java
r23529 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping; 2 3 -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPlugin.java
r32346 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping; 2 3 … … 27 28 import org.openstreetmap.josm.Main; 28 29 import org.openstreetmap.josm.actions.JosmAction; 29 import org.openstreetmap.josm.gui.MapView;30 import org.openstreetmap.josm.gui.MapView.LayerChangeListener;31 30 import org.openstreetmap.josm.gui.layer.GpxLayer; 32 31 import org.openstreetmap.josm.gui.layer.Layer; 32 import org.openstreetmap.josm.gui.layer.LayerManager.LayerAddEvent; 33 import org.openstreetmap.josm.gui.layer.LayerManager.LayerChangeListener; 34 import org.openstreetmap.josm.gui.layer.LayerManager.LayerOrderChangeEvent; 35 import org.openstreetmap.josm.gui.layer.LayerManager.LayerRemoveEvent; 36 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeEvent; 37 import org.openstreetmap.josm.gui.layer.MainLayerManager.ActiveLayerChangeListener; 33 38 import org.openstreetmap.josm.plugins.Plugin; 34 39 import org.openstreetmap.josm.plugins.PluginInformation; … … 39 44 import uk.co.caprica.vlcj.player.DeinterlaceMode; 40 45 41 /** 46 /** 47 * This Plugin allows you to link multiple videos against a GPS track and playback both synchronously 42 48 * @author Matthias Meißer (digi_c at arcor dot de) 43 * @ released under GPL44 * This Plugin allows you to link multiple videos against a GPS track and playback both synchronously45 49 */ 46 47 //Here we manage properties and start the other classes 48 public class VideoPlugin extends Plugin implements LayerChangeListener{ 50 public class VideoPlugin extends Plugin implements LayerChangeListener, ActiveLayerChangeListener { 49 51 private JMenu VMenu,VDeinterlacer; 50 52 private JosmAction VAdd,/*VRemove,*/VStart,Vbackward,Vforward,VJump,Vfaster,Vslower,Vloop; … … 69 71 super(info); 70 72 VideoEngine.setupPlayer(); 71 MapView.addLayerChangeListener(this); 73 Main.getLayerManager().addLayerChangeListener(this); 74 Main.getLayerManager().addActiveLayerChangeListener(this); 72 75 createMenusAndShortCuts(); 73 76 enableVideoControlMenus(false); … … 330 333 } 331 334 335 private void handleLayer(Layer l) { 336 VMenu.setEnabled(true); 337 if (l instanceof GpxLayer) { 338 VAdd.setEnabled(true); 339 gpsLayer = (GpxLayer) l; 340 //TODO append to GPS Layer menu 341 } 342 } 343 332 344 @Override 333 public void activeLayerChange(Layer oldLayer, Layer newLayer) { 334 VMenu.setEnabled(true); 335 if (newLayer instanceof GpxLayer) 336 { 337 VAdd.setEnabled(true); 338 gpsLayer=((GpxLayer) newLayer); 339 //TODO append to GPS Layer menu 340 } 345 public void activeOrEditLayerChanged(ActiveLayerChangeEvent e) { 346 handleLayer(Main.getLayerManager().getActiveLayer()); 341 347 } 342 348 343 349 @Override 344 public void layer Added(Layerarg0) {345 activeLayerChange(null,arg0);350 public void layerOrderChanged(LayerOrderChangeEvent e) { 351 // Do nothing 346 352 } 347 353 348 354 @Override 349 public void layerRemoved(Layer arg0) { 350 if(arg0 instanceof VideoPositionLayer) 351 enableVideoControlMenus(false); 352 activeLayerChange(null,arg0); 355 public void layerAdded(LayerAddEvent e) { 356 handleLayer(e.getAddedLayer()); 357 } 358 359 @Override 360 public void layerRemoving(LayerRemoveEvent e) { 361 if (e.getRemovedLayer() instanceof VideoPositionLayer) 362 enableVideoControlMenus(false); 363 handleLayer(e.getRemovedLayer()); 353 364 } 354 365 } -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/VideoPositionLayer.java
r30737 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping; 2 3 … … 8 9 import java.awt.Rectangle; 9 10 import java.awt.event.MouseEvent; 10 import java.awt.event.MouseListener;11 import java.awt.event.MouseMotionListener;12 11 import java.text.DateFormat; 13 12 import java.text.SimpleDateFormat; … … 37 36 38 37 //Basic rendering and GPS layer interaction 39 public class VideoPositionLayer extends Layer implements MouseListener,MouseMotionListener{38 public class VideoPositionLayer extends Layer { 40 39 private List<WayPoint> gpsTrack; 41 40 private ImageIcon layerIcon; … … 51 50 gpsTrack=importGPSLayer(gpsLayer.data); 52 51 gpsTimeFormat= new SimpleDateFormat("HH:mm:ss"); 53 Main.map.mapView.addMouseListener(this);54 Main.map.mapView.addMouseMotionListener(this);55 52 iconPosition=gpsTrack.get(0); 56 Main. main.addLayer(this);53 Main.getLayerManager().addLayer(this); 57 54 } 58 55 … … 293 290 public void visitBoundingBox(BoundingXYVisitor arg0) { 294 291 } 295 296 public void mouseClicked(MouseEvent arg0) {297 }298 299 public void mouseEntered(MouseEvent arg0) {300 }301 302 public void mouseExited(MouseEvent arg0) {303 }304 305 public void mousePressed(MouseEvent e) {306 }307 308 public void mouseDragged(MouseEvent arg0) {309 }310 311 public void mouseMoved(MouseEvent arg0) {312 }313 292 314 293 public void setGPSVideoPlayer(GPSVideoPlayer player) { … … 321 300 322 301 public void unload() { 323 Main. main.removeLayer(this);302 Main.getLayerManager().removeLayer(this); 324 303 } 325 304 } -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideo.java
r30639 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping.video; 2 3 import java.io.File; -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/GPSVideoPlayer.java
r30737 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping.video; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/Video.java
r28924 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping.video; 2 3 -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoEngine.java
r31877 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping.video; 2 3 -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoObserversEvents.java
r25896 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping.video; 2 3 -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayer.java
r30737 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping.video; 2 3 import static org.openstreetmap.josm.tools.I18n.tr; -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideoPlayerObserver.java
r29769 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping.video; 2 3 -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/video/VideosObserver.java
r29769 r32513 1 // License: GPL. For details, see LICENSE file. 1 2 package org.openstreetmap.josm.plugins.videomapping.video; 2 3
Note:
See TracChangeset
for help on using the changeset viewer.