1 | static int comboBoxFindItem_withSimplifier(final JComboBox cb, fS item, fO simplifier) { |
2 | ret cb == null ? null : swing(func -> int { |
3 | ComboBoxModel model = cb.getModel(); |
4 | int n = model.getSize(); |
5 | for i to n: |
6 | if (eq(callF(simplifier, model.getElementAt(i)), item)) |
7 | ret i; |
8 | ret -1; |
9 | }); |
10 | } |
Began life as a copy of #1020161
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: | #1020177 |
Snippet name: | comboBoxFindItem_withSimplifier |
Eternal ID of this version: | #1020177/3 |
Text MD5: | 9b19c085362daca848d220c61b4d547e |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-09 20:51:28 |
Source code size: | 326 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 301 / 314 |
Version history: | 2 change(s) |
Referenced in: | [show references] |