Libraryless. Click here for Pure Java version (25241L/160K).
svoid imageSurfaceOnLeftMouseDown(ImageSurface is, IVF1<Pt> action) { if (is == null || action == null) ret; swing { MouseAdapter ma = new MouseAdapter { public void mousePressed(MouseEvent e) { if (e.getButton() == 1) pcallF(action, is.pointFromEvent(e)); } }; is.addMouseListener(ma); } }
Began life as a copy of #1024682
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033920 | 
| Snippet name: | imageSurfaceOnLeftMouseDown | 
| Eternal ID of this version: | #1033920/3 | 
| Text MD5: | 790645cc8266c5a45efad62e3024fd0e | 
| Transpilation MD5: | eec8fdfaf47bc3fdc5c5439f9072ea6b | 
| Author: | stefan | 
| Category: | javax / gui | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2022-01-11 21:22:48 | 
| Source code size: | 349 bytes / 12 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 354 / 472 | 
| Version history: | 2 change(s) | 
| Referenced in: | [show references] |