1 | sclass CircleDoubleClicker extends MouseAdapter { |
2 | CirclesAndLines cal; |
3 | Canvas canvas; |
4 | O onClick; |
5 | |
6 | *(CirclesAndLines *cal, Canvas *canvas, O *onClick) { |
7 | if (containsInstance(canvas.tools, CircleDoubleClicker)) ret; |
8 | canvas.tools.add(this); |
9 | canvas.addMouseListener(this); |
10 | } |
11 | |
12 | public void mouseClicked(MouseEvent e) { |
13 | if (e.getButton() == MouseEvent.BUTTON1 && e.getClickCount() == 2) { |
14 | Pt p = canvas.pointFromEvent(e); |
15 | Circle c = cal.findCircle(canvas, p); |
16 | if (c != null) |
17 | pcallF(onClick, c); |
18 | } |
19 | } |
20 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1007464 |
Snippet name: | CircleDoubleClicker |
Eternal ID of this version: | #1007464/6 |
Text MD5: | 8efcfa726ec70a2a4e1980263e65d0e1 |
Author: | stefan |
Category: | javax / a.i. / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-03-23 23:17:30 |
Source code size: | 572 bytes / 20 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 522 / 1112 |
Version history: | 5 change(s) |
Referenced in: | [show references] |