[OpenMap Users] layer not responding to mouse input

From: Robert Najlis <rnajlis_at_cs.indiana.edu>
Date: Fri, 10 Sep 2004 17:53:21 -0400

From: Robert Najlis <rnajlis_at_cs.indiana.edu>
Date: September 10, 2004 5:43:56 PM EDT
To: Don Dietrick <dietrick_at_bbn.com>, <openmap-users_at_bbn.com>
<openmap-users_at_bbn.com> <openmap-users_at_bbn.com>
Subject: layer not responding to mouse input


I am having troubles getting a layer to respond to mouse inputs.

I have subclassed OMGraphicHandleraLayer and implemented
MapMouseListener (I even tried implementing ActionListener which had
worked for me in the past).

I don't get a response at all. I have tried many variations (at first
I had not set the consumeEvents, , setMouseModeIDsforEvents and
setMouseEventInterpreter functions, but even when I did, no change). I
also tried removing all other layers and also moving my layer to the
top, both through the gui.

Code details are provided below.

thanks a lot for your help.

-- Robert

here is how I am creating the layer and adding it to Openmap:

  RepastOMLayer layer = new RepastOMLayer();
             String[] mmi = new String[1];
             mmi[0] = "Gestures";

             layerHandler.addLayer(layer, 0);
            // layer.setVisible(true);

here is the basic code for the layer:

public class RepastOMLayer extends OMGraphicHandlerLayer implements
MapMouseListener {

  public boolean mouseClicked(MouseEvent e) {
         System.out.println("cliked - " );//


I don't get any response whatsoever, except for, on occasion - if I
keep clicking for a while, the following error:

        at sun.awt.datatransfer.DataTransferer$5.run(DataTransferer.java:2018)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:479)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

[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 Fri Sep 10 2004 - 17:57:38 EDT

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