1 | static Map<S, Int> tableColumnWidthsByName(JTable table) {
|
2 | TableColumnModel tcm = table.getColumnModel(); |
3 | if (tcm == null) null; |
4 | int n = tcm.getColumnCount(); |
5 | new TreeMap<S, Int> map; |
6 | for i to n: {
|
7 | TableColumn tc = tcm.getColumn(i); |
8 | map.put(str(tc.getHeaderValue()), tc.getWidth()); |
9 | } |
10 | ret map; |
11 | } |
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: | #1007220 |
| Snippet name: | tableColumnWidthsByName |
| Eternal ID of this version: | #1007220/5 |
| Text MD5: | 1f74662e19c9a5ed259144f18b98ee7f |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-30 14:02:05 |
| Source code size: | 327 bytes / 11 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 803 / 825 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |