Re: [OpenMap Users] OMGraphicHandlerLayer's mouseModes issue

From: Don Dietrick <>
Date: Tue, 12 Sep 2006 17:43:45 -0400

Hi Stephane,

It looks like everything gets reset when the layers change in the
MapBean, i.e. when the LayerHandler sends out it's LayerEvent that
the MapBean (and LayerMenu/MouseDelegator) receive.

You can get the MouseDelegator to reset the ids programatically by
calling setupMouseModeWithLayers(Layer[]).

- Don

On Sep 8, 2006, at 9:19 AM, Stéphane Wasserhardt wrote:

> Hello !
> I think there's an issue with the "setMouseModeIDsForEvents" method
> in OMGraphicHandlerLayer.
> Here is what I understood :
> This method is called in OMGraphicHandlerLayer.setProperty(...),
> that is to say BEFORE the layer is added to the beanContext.
> When the layer is added to the beanContext, an event is fired. This
> event reaches the mouseDelegator which calls its
> "setupMouseModeWithLayers" method. Then the mouseDelegator will
> forward any mouse events to the layer if the current mouse mode id
> is one of the ids given in setMouseModeIDsForEvents.
> The same thing also happens when a new mouseMode is added to the
> beanContext.
> Here is the issue I found :
> I put all mouseModes and all layers I need in the beanContext.
> AFTER that, I change the mouseModeIDs of one of the
> OMGraphicsHandlerLayers, using setMouseModeIDsForEvents.
> No more layers and no more mouseModes will be added the the
> beanContext after that, so no event will ever reach the
> mouseDelegator.
> The mouseDelegator's setupMouseModeWithLayers method will never be
> called again, that's why the layer will not recieve any awaited
> mouse events :-(
> Maybe I'm missing something here...
> If this is a real bug, I don't know how to properly correct it,
> because I'm not used enough to this mechanism.
> I think I will use some kind of workaround for the moment, until I
> recieve some answer from this list...
> So, any comments would be really appreciated! Thanks in advance!!
> Stephane
> --
> [To unsubscribe to this list send an email to ""
> with the following text in the BODY of the message "unsubscribe
> openmap-users"]

Don Dietrick,
BBN Technologies, Cambridge, MA

[To unsubscribe to this list send an email to ""
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Sep 12 2006 - 17:44:49 EDT

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