We have some graphics that are generated through the paintable canvas, and I want to be able to respond to a click event when the user clicks on what has been painted in the canvas.
Basically I’m creating a rectangle and then rotating it. I have a final object named rotateBelt that is of type java.awt.geom.Path2D.Double. It looks like I can then use the contains() method to see if my mouse position is within that path.
Now comes the parts I’m not sure of. How do I share that variable that I generate in the repaint event be available in the mouseMoved or mouseClicked event? I tried monkey patching the event.source object, but things weren’t happy… most likely because they are java objects not python object.