[OpenMap Users] Implementing a Layer that Hijacks Mouse Clicks

From: Renton Ian <ian.renton_at_uk.atlas-elektronik.com>
Date: Thu, 17 May 2012 10:29:02 +0100

Hi,

I am attempting to create an OpenMap layer that handles mouse events internally.

OpenMap's Layer.addMouseListener() method prevents me from attaching my own mouse listener as it rejects any listener that isn't part of javax.swing. The Javadoc helpfully points out that this is to stop classes stealing the mouse events and thus not letting them fall through to the map.

However, that's exactly what I want to do. My "overlay"-type layer gets switched on and off, but when it's on, it sits on top and steals mouse clicks to handle them itself rather than passing them through to the layers below.

Can I only do this by overriding OpenMap's Layer class to remove the check, or is there a better way to do what I'm trying to do?

Thanks,

Ian

-- 
Ian Renton
UX / Software Engineer
ATLAS ELEKTRONIK UK
Atlas House, Dorset Green Tech. Park, DT2 8ZB, U.K.
Tel: +44 (0) 1305 212341
The information contained within this e-mail and any files attached to this e-mail are private and in addition may include commercially sensitive information. The contents of this e-mail are for the intended recipient only and therefore if you wish to disclose the information contained within this e-mail or attached files, please contact the sender prior to any such disclosure.
If you are not the intended recipient, any disclosure, copying or distribution is prohibited. Please also contact the sender and inform them of the error and delete the e-mail, including any attached files from your system. 
Atlas Elektronik UK Limited Registered Office Meadows Road, Queensway Meadows, Newport, South Wales NP19 4SS, UK.  Company No. 05582639
--
[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 Thu May 17 2012 - 05:31:28 EDT

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