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

13
LINES

< > BotCompany Repo | #1015283 // onSelectionChanged - for JList

JavaX fragment (include) [tags: use-pretranspiled]

Transpiled version (5165L) is out of date.

1  
svoid onSelectionChanged(JList list, VF1<S> f) {
2  
  onSelectionChanged(list, toIVF1(f));
3  
}
4  
5  
svoid onSelectionChanged(JList list, IVF1<S> f) {
6  
  if (list != null && f != null) swing {
7  
    list.addListSelectionListener(new ListSelectionListener {
8  
      public void valueChanged(ListSelectionEvent e) {
9  
        pcallF(f, getSelectedItem(list));
10  
      }
11  
    });
12  
  }
13  
}

Author comment

Began life as a copy of #1005360

download  show line numbers  debug dex  old transpilations   

Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mowyntqkapby, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1015283
Snippet name: onSelectionChanged - for JList
Eternal ID of this version: #1015283/7
Text MD5: c3f747e0d89471a303e64e36fdea2de5
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-20 20:10:21
Source code size: 374 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 415 / 501
Version history: 6 change(s)
Referenced in: [show references]