// f : voidfunc(Pt) - point can be null, then mouse has exited static void imageSurfaceOnMouseMove(final ImageSurface is, final O f) { swing { MouseAdapter ma = new MouseAdapter { public void mouseMoved(MouseEvent e) { pcallF(f, is.pointFromEvent(e)); } public void mouseEntered(MouseEvent e) { pcallF(f, is.pointFromEvent(e)); } public void mouseExited(MouseEvent e) { pcallF(f, (Pt) null); } }; is.addMouseMotionListener(ma); is.addMouseListener(ma); } }
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, sawdedvomwva, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1005948 |
| Snippet name: | imageSurfaceOnMouseMove |
| Eternal ID of this version: | #1005948/2 |
| Text MD5: | 345447120ac9f56d17f2df21b6e9a379 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-11 13:43:25 |
| Source code size: | 565 bytes / 20 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 812 / 841 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |