1 | // r: voidfunc(col, row) |
2 | static JTable onTableCellLeftClick(final JTable table, final VF2<Int, Int> r) {
|
3 | swing {
|
4 | table.addMouseListener(new MouseAdapter {
|
5 | public void mouseClicked(MouseEvent evt) {
|
6 | if (evt.getButton() == 1 && evt.getClickCount() == 1) {
|
7 | int row = table.rowAtPoint(evt.getPoint()); |
8 | int col = table.columnAtPoint(evt.getPoint()); |
9 | table.setRowSelectionInterval(row, row); |
10 | callF(r, col, row); |
11 | } |
12 | } |
13 | }); |
14 | } |
15 | ret table; |
16 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1020420 |
| Snippet name: | onTableCellLeftClick |
| Eternal ID of this version: | #1020420/3 |
| Text MD5: | c056390c8ba3786b2e92b5412fded70d |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-12-20 22:22:04 |
| Source code size: | 525 bytes / 16 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 527 / 590 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |