static void selectFromList(S title, L<S> items, final VF1<S> onSelect) { final JList list = jlist(items); JButton btnOK = listDependentButton(list, "OK", r { fS item = getSelectedItem(list); if (item == null) ret; disableButtonWhileCalcing2(func -> bool { callF_returnTrueIfNoException(onSelect, item) }); }); onDoubleClickOrEnter(list, rClickButton(btnOK)); showFrame(title, centerAndSouthWithMargins(list, jcenteredline(btnOK, jCancelButton()))); }
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: | #1015873 | 
| Snippet name: | selectFromList | 
| Eternal ID of this version: | #1015873/5 | 
| Text MD5: | 472129ed684ec37de9b5404c5d9665ff | 
| Author: | stefan | 
| Category: | javax / gui | 
| Type: | JavaX fragment (include) | 
| Public (visible to everyone): | Yes | 
| Archived (hidden from active list): | No | 
| Created/modified: | 2018-05-29 14:14:48 | 
| Source code size: | 489 bytes / 13 lines | 
| Pitched / IR pitched: | No / No | 
| Views / Downloads: | 696 / 654 | 
| Version history: | 4 change(s) | 
| Referenced in: | [show references] |