Re: [OpenMap Users] mouse events

From: Don Dietrick <dietrick_at_bbn.com>
Date: Fri, 3 Dec 2004 09:50:00 -0500

Steve,

The standard way to handle mouse events is to let a layer react to
them. Cary's email addresses different ways to handle that. You
probably need to add a MouseDelegator to the MapHandler, a MapMouseMode
or two (try the SelectMouseMode or NavMouseMode2), and a
MouseModeButtonPanel. They automatically hook up to the MapBean.

The layer has to say what mouse modes it want's to receive events from.

You might want to look at the crew example, the RouteLayer reacts to
mouse events on the map.

- Don


On Dec 2, 2004, at 6:26 AM, SteveC wrote:

> Hi,
>
> I have an applet using a BufferedMapBean only. It works fine but I'm
> not
> getting mouse events. It basically follows the SimpleMap.java example
> with my own Layer subclass being used. I've written a MapMouseListener
> and the get method etc etc etc in. I know I have to use a
> SimpleMapHandler or similar to actually get events. But I don't know
> how.
>
> There is a SimpleMap2 example here:
>
> http://openmap.bbn.com/src/openmap/com/bbn/openmap/examples/simple/
> SimpleMap2.java
>
> but I can't get it to work without having to use an OpenMapFrame, which
> I don't want.
>
> Is there an example using just the bean (not the toolbar, menu, etc)
> somewhere or could someone give me a quick snippet of code that should
> work?
>
> TIA!
>
> have fun,
>
> SteveC steve_at_fractalus.com http://www.fractalus.com/steve/
> --
> [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"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Fri Dec 03 2004 - 09:52:20 EST

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