[OpenMap Users] MapMouseListener

From: Sperlongano Brian M NPRI <SperlonganoBM@Npt.NUWC.Navy.Mil>
Date: Tue Mar 23 2004 - 09:08:55 EST

I'm trying to make my layer receive mouse events.

In addition, I'm trying to make the MapBean receive mouse events (click to recenter, mouse wheel to zoom).

Now, I made my layer implement MapMouseListener, and overrided the getMouseModeServiceList() function as follows:

        public String[] getMouseModeServiceList()
        {
                return new String[] { SelectMouseMode.modeID };
        }

On my overridden MapBean class, I implement MouseListener and MouseWheelListener.

My problem is that while the MapBean gets all the mouse events, the Layer doesn't seem to get any. I suspect the MouseListener/MouseWheelListener is blocking the layer from getting mouse events. Any thoughts?

--- on a related note ---

When going through the documentation on MapMouseListener, I found the following paragraph in the description for the method getMouseModeServiceList():

"Return a list of the modes that are interesting to the MapMouseListener. The source MouseEvents will only get sent to the MapMouseListener if the mode is set to one that the listener is interested in. Layers interested in receiving events should register for receiving events in "select" mode"

What the heck does this paragraph mean?

Thanks,
Brian

--
[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 Tue Mar 23 09:09:29 2004

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