1 | static S wordAtMouse() {
|
2 | ret (S) swing(func {
|
3 | Component c = (Component) componentAtMouse_gen(); |
4 | if (c instanceof JTextComponent) {
|
5 | JTextComponent tc = cast c; |
6 | Point d = mouseToComponent(c); |
7 | int idx = tc.viewToModel(d); |
8 | S text = tc.getText(); |
9 | ret wordAroundIndex(text, idx); |
10 | } |
11 | ret ""; |
12 | }); |
13 | } |
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: | #1007432 |
| Snippet name: | wordAtMouse (current VM only) |
| Eternal ID of this version: | #1007432/3 |
| Text MD5: | 96cbd39b0175b82863a3f0cbde323139 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2017-04-29 15:15:09 |
| Source code size: | 351 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 914 / 922 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |