com.partnersoft.maps.app
Class MapViewMouseHandler

java.lang.Object
  extended by com.partnersoft.maps.app.MapViewMouseHandler
All Implemented Interfaces:
MapMotionListener, MapMouseListener, java.util.EventListener

public class MapViewMouseHandler
extends java.lang.Object
implements MapMotionListener, MapMouseListener

This little varmint takes care of mouse input. Dragging moves the map, clicking selects and double-clicking zooms.

Author:
Paul Reavis Copyright 2003 Partner Software, Inc.

Constructor Summary
MapViewMouseHandler(MapApp app)
           
 
Method Summary
 void mapClicked(MapMouseEvent event)
          Invoked when the mouse has been clicked on a map.
 void mapDragged(MapMouseEvent event)
          Invoked when a mouse button is pressed on a map and then dragged.
 void mapEntered(MapMouseEvent event)
          Invoked when the mouse enters a map.
 void mapExited(MapMouseEvent event)
          Invoked when the mouse exits a map.
 void mapMoved(MapMouseEvent event)
          Invoked when the mouse button has been moved on a map (with no buttons no down).
 void mapPressed(MapMouseEvent event)
          Invoked when a mouse button has been pressed on a map.
 void mapReleased(MapMouseEvent event)
          Invoked when a mouse button has been released on a map.
 void mapWheeled(MapMouseEvent event)
          Invoked when the mouse wheel turns.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapViewMouseHandler

public MapViewMouseHandler(MapApp app)
Method Detail

mapClicked

public void mapClicked(MapMouseEvent event)
Description copied from interface: MapMouseListener
Invoked when the mouse has been clicked on a map.

Specified by:
mapClicked in interface MapMouseListener

mapMoved

public void mapMoved(MapMouseEvent event)
Description copied from interface: MapMotionListener
Invoked when the mouse button has been moved on a map (with no buttons no down).

Specified by:
mapMoved in interface MapMotionListener

mapPressed

public void mapPressed(MapMouseEvent event)
Description copied from interface: MapMouseListener
Invoked when a mouse button has been pressed on a map.

Specified by:
mapPressed in interface MapMouseListener

mapDragged

public void mapDragged(MapMouseEvent event)
Description copied from interface: MapMotionListener
Invoked when a mouse button is pressed on a map and then dragged. Mouse drag events will continue to be delivered until the mouse button is released (regardless of whether the mouse position is within the bounds of the map).

Specified by:
mapDragged in interface MapMotionListener

mapReleased

public void mapReleased(MapMouseEvent event)
Description copied from interface: MapMouseListener
Invoked when a mouse button has been released on a map.

Specified by:
mapReleased in interface MapMouseListener

mapEntered

public void mapEntered(MapMouseEvent event)
Description copied from interface: MapMouseListener
Invoked when the mouse enters a map.

Specified by:
mapEntered in interface MapMouseListener

mapExited

public void mapExited(MapMouseEvent event)
Description copied from interface: MapMouseListener
Invoked when the mouse exits a map.

Specified by:
mapExited in interface MapMouseListener

mapWheeled

public void mapWheeled(MapMouseEvent event)
Description copied from interface: MapMouseListener
Invoked when the mouse wheel turns.

Specified by:
mapWheeled in interface MapMouseListener