// r: voidfunc(col, row)
static JTable onTableCellLeftClick(final JTable table, final VF2<Int, Int> r) {
swing {
table.addMouseListener(new MouseAdapter {
public void mouseClicked(MouseEvent evt) {
if (evt.getButton() == 1 && evt.getClickCount() == 1) {
int row = table.rowAtPoint(evt.getPoint());
int col = table.columnAtPoint(evt.getPoint());
table.setRowSelectionInterval(row, row);
callF(r, col, row);
}
}
});
}
ret table;
}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: | 743 / 786 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |