Re: MapMouseListener problem

From: Mike White <mrw@mitre.org>
Date: Wed Jan 16 2002 - 16:04:48 EST

My applet is based on one of the simple examples rather than
OpenMapApplet.java, which is probably part of the problem.

I haven't figured out how to determine or set the current mouse mode.
The docs mention MouseDelegator for setting the mode, and I think
you get that from a MapHandler. I'm not sure how to get the MapHandler
though.

Donald Dietrick wrote:
>
> Hi Mike,
>
> Is the "Gestures" mouse mode active?
>
> - Don
>
> On Wednesday, January 16, 2002, at 03:23 PM, Mike White wrote:
>
> > I've implemented a layer which wants to get selection mouse events.
> > Below is the code for my layer. Unfortunately, my mouse handling
> > calls never happen. Even getMapMouseListener() and
> > getMouseModeServiceList() never get called. The paint and
> > projectionChanged methods do get called appropriately, so
> > the layer is "active" in that sense. How do I get it so that this
> > layer receives mouse events?
> >
> > public class SensorOMLayer extends Layer implements MapMouseListener
> > {
> > ...
> >
> > public MapMouseListener getMapMouseListener()
> > {
> > return this;
> > }
> >
> > public java.lang.String[] getMouseModeServiceList()
> > {
> > // Return a list of the modes that are interesting to the
> > MapMouseListener.
> > return new String[] { SelectMouseMode.modeID };
> > }
> >
> > ...
> >
> > public boolean mouseClicked(java.awt.event.MouseEvent e)
> > {
> > System.out.println( "Got click!\n" );
> > ...
> >
> > return true;
> > }
> >
> > ... etc. other mouse routines.
> > };
> >
> > --
> > [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"]
> >
> >
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Donald Dietrick, dietrick@bbn.com
> BBN Technologies, Cambridge, MA
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[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 Wed Jan 16 16:10:04 2002

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