Actually, don't you mean return false?
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"]Received on Mon Nov 19 10:30:53 2001
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT