I've implemented a layer which wants to get selection mouse events.
Below is the code for my layer. Unfortunately, my mouse handling
calls never happen. Even getMapMouseListener() and
getMouseModeServiceList() never get called. The paint and
projectionChanged methods do get called appropriately, so
the layer is "active" in that sense. How do I get it so that this
layer receives mouse events?
public class SensorOMLayer extends Layer implements MapMouseListener
{
...
public MapMouseListener getMapMouseListener()
{
return this;
}
public java.lang.String[] getMouseModeServiceList()
{
// Return a list of the modes that are interesting to the
MapMouseListener.
return new String[] { SelectMouseMode.modeID };
}
...
public boolean mouseClicked(java.awt.event.MouseEvent e)
{
System.out.println( "Got click!\n" );
...
return true;
}
... etc. other mouse routines.
};
-- [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 Wed Jan 16 15:28:52 2002
This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT