Working with mouseDragged() and other mouse events inside a class