Changeset 22550 in osm for applications/editors/josm/plugins/videomapping
- Timestamp:
- 2010-08-03T08:21:38+02:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/videomapping
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/videomapping/.classpath
r21631 r22550 5 5 <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/> 6 6 <classpathentry combineaccessrules="false" kind="src" path="/JOSM"/> 7 <classpathentry kind="lib" path="D:/Projekte/Studium/GeoProjekt/working/VideoMapping/lib/jna.jar"/> 8 <classpathentry kind="lib" path="D:/Projekte/Studium/GeoProjekt/working/VideoMapping/lib/vlcj-1.1h.jar"> 9 <attributes> 10 <attribute name="javadoc_location" value="jar:file:/D:/Projekte/Studium/GeoProjekt/working/vlcj/vlcj-1.1h-javadoc.jar!/"/> 11 </attributes> 12 </classpathentry> 13 <classpathentry kind="lib" path="D:/Projekte/Studium/GeoProjekt/working/VideoMapping/lib/log4j.jar"/> 7 <classpathentry kind="lib" path="lib/jna.jar"/> 8 <classpathentry kind="lib" path="lib/log4j.jar"/> 9 <classpathentry kind="lib" path="lib/vlcj-1.1h.jar"/> 14 10 <classpathentry kind="output" path="bin"/> 15 11 </classpath> -
applications/editors/josm/plugins/videomapping/build.xml
r21706 r22550 33 33 <property name="commit.message" value="videomapping" /> 34 34 <!-- enter the *lowest* JOSM version this plugin is currently compatible with --> 35 <property name="plugin.main.version" value=" 1234" />35 <property name="plugin.main.version" value="3408" /> 36 36 37 37 … … 110 110 <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/wiki/JOSM/Plugins/VideoMapping"/> 111 111 <attribute name="Plugin-Mainversion" value="${plugin.main.version}"/> 112 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 112 <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/> 113 113 </manifest> 114 114 <zipfileset src="lib/vlcj-1.1h.jar" /> … … 165 165 166 166 <!-- 167 ************************** Publishing the plugin *********************************** 167 ************************** Publishing the plugin *********************************** 168 168 --> 169 169 <!-- 170 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 170 ** extracts the JOSM release for the JOSM version in ../core and saves it in the 171 171 ** property ${coreversion.info.entry.revision} 172 172 ** … … 217 217 218 218 <!-- 219 ** commits the plugin.jar 219 ** commits the plugin.jar 220 220 --> 221 221 <target name="commit-dist"> 222 222 <echo> 223 223 ***** Properties of published ${plugin.jar} ***** 224 Commit message : '${commit.message}' 224 Commit message : '${commit.message}' 225 225 Plugin-Mainversion: ${plugin.main.version} 226 226 JOSM build version: ${coreversion.info.entry.revision} 227 227 Plugin-Version : ${version.entry.commit.revision} 228 ***** / Properties of published ${plugin.jar} ***** 229 228 ***** / Properties of published ${plugin.jar} ***** 229 230 230 Now commiting ${plugin.jar} ... 231 231 </echo> -
applications/editors/josm/plugins/videomapping/src/org/openstreetmap/josm/plugins/videomapping/PositionLayer.java
r21779 r22550 2 2 3 3 4 import java.sql.Time; 5 import java.text.DateFormat; 6 import java.text.SimpleDateFormat; 7 import java.util.ArrayList; 8 import java.util.Collection; 9 import java.util.Date; 10 import java.util.HashSet; 11 import java.util.Iterator; 12 import java.util.LinkedList; 13 import java.util.List; 14 import java.util.ListIterator; 15 import java.util.Set; 16 import java.util.Timer; 17 import java.util.TimerTask; 4 import static org.openstreetmap.josm.tools.I18n.tr; 18 5 19 6 import java.awt.Color; 20 import java.awt.Component;21 7 import java.awt.Cursor; 22 import java.awt.Dimension;23 8 import java.awt.Graphics2D; 24 9 import java.awt.Point; 25 10 import java.awt.Rectangle; 26 import java.awt.event.ActionEvent;27 import java.awt.event.KeyEvent;28 import java.awt.event.KeyListener;29 11 import java.awt.event.MouseEvent; 30 12 import java.awt.event.MouseListener; 31 13 import java.awt.event.MouseMotionListener; 32 33 import javax.swing.*; 34 35 import static org.openstreetmap.josm.tools.I18n.*; 14 import java.text.SimpleDateFormat; 15 import java.util.HashSet; 16 import java.util.LinkedList; 17 import java.util.List; 18 import java.util.Set; 19 20 import javax.swing.Action; 21 import javax.swing.Icon; 22 import javax.swing.ImageIcon; 36 23 37 24 import org.openstreetmap.josm.Main; 38 import org.openstreetmap.josm.actions.InfoAction;39 25 import org.openstreetmap.josm.data.Bounds; 40 import org.openstreetmap.josm.data.gpx.GpxData;41 26 import org.openstreetmap.josm.data.gpx.WayPoint; 42 import org.openstreetmap.josm.data.osm.DataSet;43 import org.openstreetmap.josm.data.osm.Node;44 27 import org.openstreetmap.josm.data.osm.visitor.BoundingXYVisitor; 45 28 import org.openstreetmap.josm.gui.MapView; … … 48 31 import org.openstreetmap.josm.gui.layer.Layer; 49 32 import org.openstreetmap.josm.plugins.videomapping.video.GPSVideoPlayer; 50 import org.openstreetmap.josm.tools.ImageProvider;51 import org.openstreetmap.josm.tools.Shortcut;52 53 import com.sun.jna.StringArray;54 33 55 34 //Basic rendering and GPS layer interaction … … 65 44 private SimpleDateFormat ms; 66 45 private GPSVideoPlayer gps; 67 46 68 47 public PositionLayer(String name, final List<WayPoint> ls) { 69 48 super(name); … … 74 53 ms= new SimpleDateFormat("mm:ss"); 75 54 Main.map.mapView.addMouseListener(this); 76 Main.map.mapView.addMouseMotionListener(this); 77 55 Main.map.mapView.addMouseMotionListener(this); 56 78 57 } 79 58 … … 94 73 95 74 @Override 96 public Component[] getMenuEntries() {97 return new Component[]{98 new JMenuItem(LayerListDialog.getInstance().createShowHideLayerAction(this)),99 new JMenuItem(LayerListDialog.getInstance().createDeleteLayerAction(this)),100 new JSeparator(),75 public Action[] getMenuEntries() { 76 return new Action[]{ 77 LayerListDialog.getInstance().createShowHideLayerAction(), 78 LayerListDialog.getInstance().createDeleteLayerAction(), 79 SeparatorLayerAction.INSTANCE, 101 80 //TODO here my stuff 102 new JSeparator(), 103 new JMenuItem(new LayerListPopup.InfoAction(this))};//TODO here infos about the linked videos 104 } 105 81 new LayerListPopup.InfoAction(this)};//TODO here infos about the linked videos 82 } 83 106 84 107 85 … … 119 97 @Override 120 98 public void mergeFrom(Layer arg0) { 121 122 } 123 124 125 99 100 } 101 102 103 126 104 @Override 127 105 //Draw the current position, infos, waypoints … … 177 155 { 178 156 p=Main.map.mapView.getPoint(iconPosition.getEastNorth()); 179 icon.paintIcon(null, g, p.x-icon.getIconWidth()/2, p.y-icon.getIconHeight()/2); 157 icon.paintIcon(null, g, p.x-icon.getIconWidth()/2, p.y-icon.getIconHeight()/2); 180 158 g.drawString(mins.format(iconPosition.getTime()),p.x-10,p.y-10); 181 159 } … … 185 163 if (player.getCurr()!=null){ 186 164 p=Main.map.mapView.getPoint(player.getCurr().getEastNorth()); 187 icon.paintIcon(null, g, p.x-icon.getIconWidth()/2, p.y-icon.getIconHeight()/2); 165 icon.paintIcon(null, g, p.x-icon.getIconWidth()/2, p.y-icon.getIconHeight()/2); 188 166 g.drawString(ms.format(player.getRelativeTime()),p.x-10,p.y-10); 189 167 } 190 168 } 191 169 } 192 170 193 171 //finds the first waypoint that is nearby the given point 194 172 private WayPoint getNearestWayPoint(Point mouse) … … 202 180 p = Main.map.mapView.getPoint(n.getEastNorth()); 203 181 if (rect.contains(p)) 204 { 182 { 205 183 return n; 206 184 } 207 185 208 186 } 209 187 return null; 210 211 } 212 188 189 } 190 213 191 //upper left corner like rectangle 214 192 private Rectangle getIconRect() … … 225 203 } 226 204 227 public void mouseClicked(MouseEvent e) { 228 } 229 230 public void mouseEntered(MouseEvent arg0) { 205 public void mouseClicked(MouseEvent e) { 206 } 207 208 public void mouseEntered(MouseEvent arg0) { 231 209 } 232 210 … … 247 225 } 248 226 } 249 250 } 251 227 228 } 229 252 230 // 253 public void mouseReleased(MouseEvent e) { 231 public void mouseReleased(MouseEvent e) { 254 232 //only leftclicks on our layer 255 233 if(e.getButton() == MouseEvent.BUTTON1) { … … 270 248 Main.map.mapView.repaint(); 271 249 } 272 273 } 274 250 251 } 252 275 253 //slide and restrict during movement 276 public void mouseDragged(MouseEvent e) { 254 public void mouseDragged(MouseEvent e) { 277 255 if(dragIcon) 278 { 256 { 279 257 mouse=e.getPoint(); 280 258 //restrict to GPS track … … 286 264 287 265 //visualize drag&drop 288 public void mouseMoved(MouseEvent e) { 266 public void mouseMoved(MouseEvent e) { 289 267 if (player.getCurr()!=null) 290 { 268 { 291 269 if (getIconRect().contains(e.getPoint())) 292 270 { … … 298 276 } 299 277 } 300 278 301 279 } 302 280 303 281 public void setGPSPlayer(GPSVideoPlayer player) { 304 282 this.gps = player; 305 306 } 307 283 284 } 285 308 286 public static void addObserver(PlayerObserver observer) { 309 287 … … 312 290 } 313 291 314 292 315 293 316 294 public static void removeObserver(PlayerObserver observer) {
Note:
See TracChangeset
for help on using the changeset viewer.