Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

10
LINES

< > BotCompany Repo | #1020177 // comboBoxFindItem_withSimplifier

JavaX fragment (include)

static int comboBoxFindItem_withSimplifier(final JComboBox cb, fS item, fO simplifier) {
  ret cb == null ? null : swing(func -> int {
    ComboBoxModel model = cb.getModel();
    int n = model.getSize();
    for i to n:
      if (eq(callF(simplifier, model.getElementAt(i)), item))
        ret i;
    ret -1;
  });
}

Author comment

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: 300 / 313
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)