Hijack the component's mouse listeners.
513825
public void hijack ()
    {
        _mls = _comp.getMouseListeners();
        for (int ii=0; ii < _mls.length; ii++) {
            _comp.removeMouseListener(_mls[ii]);
        }

        _mmls = _comp.getMouseMotionListeners();
        for (int ii=0; ii < _mmls.length; ii++) {
            _comp.removeMouseMotionListener(_mmls[ii]);
        }

        _comp.addMouseMotionListener(_motionCatcher);
    }
385329
def focusInEvent(self, event):
        """"""
        self.focus_changed.emit()
        return super(ControlWidget, self).focusInEvent(event)
357784
public void mouseReleased (MouseEvent event)
    {
        if (_activeItem == null) {
            long when = RunAnywhere.getWhen(event);
            if (!_msMode && (when < _poptime + DRAGMODE_DELAY)) {
                // if the dragmode delay time hasn't passed, then we're going to leave the menu up
                // because the user wants it to behave like a MS Windows menu.
                _msMode = true;
                return;

            // if they've double clicked, then activate the default item
            } else if (_msMode && (when < _poptime + DOUBLECLICK_DELAY)) {
                _activeItem = _defaultItem;
            }
        }

        // deactivate the active item and post a command for it
        if (_activeItem != null) {
            // only process the selection if the item is enabled
            if (!_activeItem.isEnabled(this)) {
                return;
            }

            // if the item has an overriding argument, use that
            if (_activeItem.command != null) {
                Object itemArg = _activeItem.argument;
                Object arg = (itemArg == null) ? _argument : itemArg;

                // notify our listeners that the action is posted
                final CommandEvent evt = new CommandEvent(
                    _host.getComponent(), _activeItem.command, arg);
                _actlist.apply(new ObserverList.ObserverOp<ActionListener>() {
                    public boolean apply (ActionListener obs) {
                        obs.actionPerformed(evt);
                        return true;
                    }
                });
            }

            _activeItem.setActive(false);
            _activeItem = null;
        }

        // deactive ourselves
        deactivate();
    }
1287691
private void addMouseListener(MouseAwt mouse)
    {
        componentForMouse.addMouseListener(mouse.getClicker());
        componentForMouse.addMouseMotionListener(mouse.getMover());
        componentForMouse.requestFocus();
    }
844611
function mouseup(inEvent) {
  if (!this.isEventSimulatedFromTouch_(inEvent)) {
    const p = this.pointerMap[POINTER_ID.toString()];

    if (p && p.button === inEvent.button) {
      const e = prepareEvent(inEvent, this.dispatcher);
      this.dispatcher.up(e, inEvent);
      this.cleanupMouse();
    }
  }
}
117141
public void deactivate ()
    {
        if (_host != null) {
            // unwire ourselves from the host component
            Component comp = _host.getComponent();
            comp.removeMouseListener(this);
            comp.removeMouseMotionListener(this);

            // reinstate the previous mouse listeners
            if (_hijacker != null) {
                _hijacker.release();
                _hijacker = null;
            }

            // tell our host that we are no longer
            _host.menuDeactivated(this);

            // fire off a last repaint to clean up after ourselves
            repaint();
        }

        // clear out our references
        _host = null;
        _tbounds = null;
        _argument = null;

        // clear out our action listeners
        _actlist.clear();
    }
588394
function(){

            var self = this;
            self.pause();

            // notify before
            this.emit('destroy');

            // remove all listeners
            self.off( true );
            // remove everything
            self.remove( self.getBodies() );
            self.remove( self.getBehaviors() );
            self.integrator( null );
            self.renderer( null );
        }
188738
function () {
      this.clear();
      if (this.interactive) {
        removeListener(this.upperCanvasEl, 'mousedown', this._onMouseDown);
        removeListener(this.upperCanvasEl, 'mousemove', this._onMouseMove);
        removeListener(fabric.window, 'resize', this._onResize);
      }
      return this;
    }
1324218
function onMouseUp(event, env, isSideEffectsDisabled) {
    mouse.up(event);

    if (!env || isSideEffectsDisabled) {
        return;
    }

    if (objectMoved) {
        if(env.selector.isSelectedEditable()) {
            events.triggerObjectChange(env.selector.getSelectedObject());
        }

        objectMoved = false;
    }
}
537995
def mouseMove(self, x, y):
        
        log.debug('mouseMove %d,%d', x, y)
        self.x, self.y = x, y
        self.pointerEvent(x, y, self.buttons)
        return self
846976
public void mousePressed (MouseEvent e)
    {
        // ignore if we're not enabled
        if (!isEnabled()) {
            return;
        }

        // keep track of the selected button
        _selectedButton = (JLabel)e.getSource();
        // if the selected button is already selected, ignore the click
        if (_selectedButton.getBorder() == SELECTED_BORDER) {
            _selectedButton = null;
        } else {
            _selectedButton.setBorder(SELECTED_BORDER);
            _selectedButton.repaint();
        }
    }
115976
@Override
    public void mouseClicked(MouseEvent evt) {
        if (evt.getClickCount() == 2) {
            triggerMaximisation((Component) evt.getSource());
        }
    }
150409
public void removeKeyListener(KeyListener listener) {
		keyListeners.remove(listener);
		keyListenersToAdd.remove(listener);
		
		if (!mouseListeners.contains(listener) && !controllerListeners.contains(listener)) {
			allListeners.remove(listener);
		}
	}
98453
def mouseMoveEvent(self, event):
        
        # ignore events when the scene is in view mode
        scene = self.scene()
        if scene and (scene.inViewMode() or scene.isConnecting()):
            event.ignore()
            return

        # call the base method
        super(XNodeConnection, self).mouseMoveEvent(event)
1246150
function () {
            if (this.visible) {
                // release the mouse event for the checkboxes
                me.input.releasePointerEvent("pointerdown", this);
                // remove the debug panel from the game world
                me.game.world.removeChild(this, true);
                // mark it as invisible
                this.visible = false;
                // force repaint
                me.game.repaint();
            }
        }
298528
function() {

		if (!this._mouseover_stack_changed_listener) {
			Lava.view_manager.lendEvent('mouse_events');
			this._mouseover_stack_changed_listener = Lava.view_manager.on('mouseover_stack_changed', this._onMouseoverStackChanged, this);
			if (!this._tooltip) this._tooltip = Lava.createWidget(this.DEFAULT_TOOLTIP_WIDGET);
			this._tooltip.inject(document.body, 'Bottom');
		}

	}
848321
function disconnectMouseEvents (scope) {
        var root = (aria.core.Browser.isIE7 || aria.core.Browser.isIE8) ? Aria.$window.document.body : Aria.$window;
        eventUtil.removeListener(root, "mousemove", {
            fn : scope._onMouseMove,
            scope : scope
        });
        eventUtil.removeListener(root, "mouseup", {
            fn : scope._onMouseUp,
            scope : scope
        });
        eventUtil.removeListener(root, "touchmove", {
            fn : scope._onMouseMove,
            scope : scope
        });
        eventUtil.removeListener(root, "touchend", {
            fn : scope._onMouseUp,
            scope : scope
        });
    }