1 | // thread-safe |
2 | static void fillListWithStrings(JList list, Cl<S> contents) {
|
3 | if (list == null) ret; |
4 | final new DefaultListModel model; |
5 | if (contents != null) for (S s : contents) |
6 | model.addElement(empty(s) ? " " : s); |
7 | swing { list.setModel(model); }
|
8 | } |
9 | |
10 | static void fillListWithStrings(final JList list, S[] contents) {
|
11 | fillListWithStrings(list, asList(contents)); |
12 | } |
download show line numbers debug dex old transpilations
Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
| Snippet ID: | #1001431 |
| Snippet name: | fillListWithStrings |
| Eternal ID of this version: | #1001431/5 |
| Text MD5: | 1a178d4a2b0aee56c13d69a58e7a95c1 |
| Author: | stefan |
| Category: | |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-07-03 12:22:53 |
| Source code size: | 389 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 1047 / 1406 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |