title: Disable globe movement on click in World Wind
body: <p>I am trying to disable movement of the globe on mouse click in World Wind. I expected to be able to do:</p>
  
  <pre><code>void disableGlobeDrag(WorldWindowGLCanvas ww) {
      ww.addMouseMotionListener(new MyMouseMotionListener());
  }
  </code></pre>
  
  <p>where <code>MyMouseMotionListener</code> consumes all of the mouse events. This is not working so instead I have to do:</p>
  
  <pre><code>void disableGlobeDrag(WorldWindowGLCanvas ww) {
      for(MouseMotionListener l : ww.getMouseMotionListeners()) {
          if(l.getClass().toString().equals("class gov.nasa.worldwind.awt.AWTInputHandler")) {
              ww.removeMouseMotionListener(l);
          }
      }
  }
  </code></pre>
  
  <p>Is it expected that consumed mouse events should still reach the <code>gov.nasa.worldwind.awt.AWTInputHandler</code> listener?</p>
  
  <p><strong>Update:</strong> <code>WorldWindowGLCanvas</code> is just calling <code>addMouseMotionListener()</code> on <code>java.awt.Component</code> so apparently I don't understand how consuming events works.</p>
  
  <p><strong>Update 2:</strong> despite sharing interfaces with Swing, calling <code>WorldWindowGLCanvas.removeMouseMotionListener()</code> with <code>AWTInputHandler</code> as the argument will prevent all other <code>MouseMotionListener</code>s from receiving events. The add and remove methods on <code>AWTInputHandler</code> should be used instead.</p>