Ignore:
Timestamp:
2008-08-07T14:46:52+02:00 (16 years ago)
Author:
stotz
Message:

New code was not compatible with Java 1.5 - reverted some parts back

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  
    119119        }
    120120
     121        public void mouseEntered(MouseEvent e) {
     122        }
     123
     124        public void mouseExited(MouseEvent e) {
     125        }
     126
     127        public void mouseMoved(MouseEvent e) {
     128        }
     129
    121130}
  • applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapController.java

    r9494 r9530  
    33//License: GPL. Copyright 2008 by Jan Peter Stotz
    44
    5 import java.awt.event.MouseAdapter;
    65import java.awt.event.MouseListener;
    76import java.awt.event.MouseMotionListener;
     
    2019 * @author Jan Peter Stotz
    2120 */
    22 public abstract class JMapController extends MouseAdapter {
     21public abstract class JMapController {
    2322
    2423        JMapViewer map;
     
    2625        public JMapController(JMapViewer map) {
    2726                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);
    3133        }
    3234
Note: See TracChangeset for help on using the changeset viewer.