Changeset 9530 in osm for applications/viewer/jmapviewer/src/org/openstreetmap
- Timestamp:
- 2008-08-07T14:46:52+02:00 (16 years ago)
- Location:
- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/DefaultMapController.java
r9494 r9530 119 119 } 120 120 121 public void mouseEntered(MouseEvent e) { 122 } 123 124 public void mouseExited(MouseEvent e) { 125 } 126 127 public void mouseMoved(MouseEvent e) { 128 } 129 121 130 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapController.java
r9494 r9530 3 3 //License: GPL. Copyright 2008 by Jan Peter Stotz 4 4 5 import java.awt.event.MouseAdapter;6 5 import java.awt.event.MouseListener; 7 6 import java.awt.event.MouseMotionListener; … … 20 19 * @author Jan Peter Stotz 21 20 */ 22 public abstract class JMapController extends MouseAdapter{21 public abstract class JMapController { 23 22 24 23 JMapViewer map; … … 26 25 public JMapController(JMapViewer map) { 27 26 this.map = map; 28 map.addMouseListener(this); 29 map.addMouseWheelListener(this); 30 map.addMouseMotionListener(this); 27 if (this instanceof MouseListener) 28 map.addMouseListener((MouseListener) this); 29 if (this instanceof MouseWheelListener) 30 map.addMouseWheelListener((MouseWheelListener) this); 31 if (this instanceof MouseMotionListener) 32 map.addMouseMotionListener((MouseMotionListener) this); 31 33 } 32 34
Note:
See TracChangeset
for help on using the changeset viewer.