CodeDraw Event Code Generator
CodeDraw Github Repository
Back to CodeDraw JavaDoc
Use switch pattern matching (only available in Java preview versions 17/18/19/20)
Use tabs
Include boilerplate
Mouse Click Event - happens once every time a mouse button is pressed down and quickly released again.
Mouse Move Event - happens continuously while the mouse is being moved.
Mouse Down Event - happens exactly once every time a mouse button is pressed down.
Mouse Up Event - happens exactly once every time a mouse button is released.
Mouse Enter Event - happens every time the mouse enters the canvas.
Mouse Leave Event - happens every time the mouse leaves the canvas.
Mouse Wheel Event - happens each time the mouse wheel is turned.
Key Down Event - happens exactly once every time a key is pressed down.
Key Up Event - happens exactly once every time a key is released.
Key Press Event - happens continuously while a key is being held down.
Window Move Event - happens every time the CodeDraw window is moved.
Window Close Event - happens exactly once after the user closes the window or cd.close() is called.
Copy to clipboard