Re: [OpenMap Users] MapMouseListener vs. MapMouseInterpreter

From: Don Dietrick <dietrick@bbn.com>
Date: Fri Mar 26 2004 - 10:41:15 EST

MapMouseListener is a combined MouseListener and MouseMotionListener,
with knowledge of the notion that MapMouseModes exist. The
MapMouseListener receives raw MouseEvents.

The MapMouseInterpreter understands the notion that MouseEvents are
occurring over OMGraphics, and is letting you know of actions over
those OMGraphics (i.e. an OMGraphic has been clicked on, an OMGraphic
has been clicked off, the mouse has been clicked over an area not
covered by an OMGraphic, etc).

I guess you would only implement a MapMouseInterpreter if you don't
like what the StandardMapMouseInterpreter is doing interpreting the
events, or if you want more control over some aspects of interpreting
MouseEvents.

On Mar 26, 2004, at 9:29 AM, Sperlongano Brian M NPRI wrote:

> Hi,
>  
> I have a layer in which I have implemented MapMouseInterpreter (which
> as we know extends MapMouseListener).  However, only the
> MapMouseListener events get called. 

Are they being called on the MapMouseInterpreter?

Oh, wait, I think I understand what's going on. Your
MapMouseInterpreter has to do the work getting the MapMouseListener
MouseEvents to call its own MapMouseInterpreter methods. You probably
want to extend the StandardMapMouseInterpeter to override it's
MapMouseInterpreter methods.

- Don

> As a high-level question, what's the difference in how you would
> implement a MapMouseListener versus a MapMouseInterpreter?  (I have
> added called setMouseEventInterpreter(this) on the Layer, but it seem
> to not do anything different)
>  
> Thanks!
>  
> Brian Sperlongano
> Computer Engineer
> NUWCDIVNPT
>  

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Mar 26 10:42:26 2004

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:38 EDT