1 | static <A> void selectFromList2(S title, final Collection<A> items, final VF1<A> r) { |
2 | final JList list = jlist(allToString(items)); |
3 | onDoubleClickOrEnter(list, r { |
4 | A a = collectionEntryAtIndex(items, selectedIndex(list)); |
5 | if (a != null) { |
6 | disposePIFrame(list); |
7 | callF(r, a); |
8 | } |
9 | }); |
10 | showCenterFrame(title, 300, 600, list); |
11 | } |
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: | #1021047 |
Snippet name: | selectFromList2 - allows non-strings |
Eternal ID of this version: | #1021047/8 |
Text MD5: | 952b5a1777bfa020ff1299d58e3a6408 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-01-19 18:01:29 |
Source code size: | 362 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 288 / 337 |
Version history: | 7 change(s) |
Referenced in: | [show references] |