Re: [OpenMap Users] MapMouseListener vs MapMouseInterpreter

From: Don Dietrick <dietrick_at_bbn.com>
Date: Thu, 30 Sep 2004 17:09:40 -0400

Hi Andrea,

The default code for implementing a MapMouseInterpreter is in the
com.bbn.openmap.omGraphics.event.StandardMapMouseInterpreter class. If
you want to change how the different events are handled, I would extend
the StandardMapMouseInterpreter class and change what calls are made to
it's GestureResponsePolicy (which is the layer). You can extend the
GestureResponsePolicy interface to include methods that you want the
layer to handle, and have your MapMouseInterpreter call those methods
instead.

For instance, if you want your layer to receive rightClick method
calls, extend GestureResponsePolicy to include a rightClick() method,
and make your layer implement that. Then, extend
StandardMapMouseInterpreter so when it's rightClick() method is called,
it just forwards it to its special, extended GestureResponsePolicy.

Hope this helps,

Don


On Sep 30, 2004, at 2:02 PM, Andrea Leone wrote:

> Hi everybody,
>
> I implemented a new layer like this one:
>
>  
>
> “public class LAYERNAME extends OMGraphicHandlerLayer implements
> MapMouseListener, MapMouseInterpreter”
>
>  
>
> I managed to make it listening to the MapMouseListener events like
> mouseclicked and mousemoved, but I can not figure out how to make it
> listening to  MapMouseInterpreter events like leftclick, rightclick
> ecc…
>
>  
>
> It is like the MapMouseListener interface is stronger than the
> MapMouseInterpreter and override it.
>
> Any idea?
>
>  
>
> Thanks,
>
> Andrea
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Sep 30 2004 - 17:10:19 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:06 EDT