----- Original Message -----
From: "Jeff Mathis" <jeff.mathis@biosgroup.com>
To: "alexander sokolov" <sokolov@system.ecology.su.se>; "Sonntag, Alexander" <sonntag@psitrans.de>; <openmap-users@bbn.com>
Sent: Monday, November 19, 2001 16:29
Subject: Re: 1 MapMouseListener for 2 or more layers
> Actually, don't you mean return false?
You are right, FALSE. As it is in the code
Thanks
as
>
>
> At 03:10 PM 11/19/2001 +0100, alexander sokolov wrote:
> > > I wonder if it is possible to have two layers with MapMouseListeners
> > > implemented
> > > in each one and to control the map objects of these two layers at the same
> > > time,
> > > without switching one of the layers off.
> > > I have the problem that only one layer can react to the mouse actions, this
> > > is the
> > > layer which lies on top of all layers that implement MapMouseListeners.
> >
> >Just make sure that your mouseClicked (or mousePressed etc) method
> >return true. Otherwise the MouseEvent will be "consumed" by layer
> >
> >
> > public boolean mouseClicked(MouseEvent e) {
> > boolean consumeEvent = false;
> > if (masterList != null) {
> > OMGraphic obj = masterList.findClosest(e.getX(), e.getY(), 1.0f);
> > if (obj != null) {
> >
> >// something useful
> >
> > consumeEvent = true;
> > }
> > }
> > return consumeEvent;
> > }
> >
> >as
> >
> >
> >
> >--
> >[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"]
>
> --
> [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"]
-- [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 Mon Nov 19 11:00:37 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT