void enableMouseMotionEvents() { if (!mouseMotionEvents) { canvas.addMouseMotionListener(this); mouseMotionEvents = true; } }