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

11
LINES

< > BotCompany Repo | #1019463 // rowSorter_setComparators

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

Libraryless. Click here for Pure Java version (2276L/15K).

// params: column index, Comparator, column index, Comparator, ...
svoid rowSorter_setComparators(JTable table, fO... params) {
  please include function setTableModel.
  setTableModel_fixSorter.put(table, voidfunc(JTable table, RowSorter sorter) {
    //print("Fixing table sorter");
    if (sorter cast TableRowSorter) {
      for (Pair<Int, Comparator> p : (LPair<Int, Comparator>) (L) paramsToPairs(params))
        sorter.setComparator(p.a, p.b);
    }
  });
}

download  show line numbers  debug dex  old transpilations   

Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1019463
Snippet name: rowSorter_setComparators
Eternal ID of this version: #1019463/8
Text MD5: b609aebd1f122576c487d3662ffcb6ec
Transpilation MD5: 0743973e5f70152041b8da4a74e999dc
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-05 12:31:23
Source code size: 477 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 373 / 476
Version history: 7 change(s)
Referenced in: [show references]