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

15
LINES

< > BotCompany Repo | #1015366 // filesForNiceButtons

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

Libraryless. Click here for Pure Java version (13018L/76K).

static L<TextImageAction> filesForNiceButtons(L<File> l, IVF1<File> action) {
  ret map(l, f -> {
    var tia = textImageActionToolTip(
      f.getName(),
      isImageFile(f) ? #1101250 : #1101231,
      r { pcallF(action, f) },
      f2s(f) + " (" + toK(fileSize(f)) + " K)");
    tia.file = f;
    ret tia;
  });
}

static L<TextImageAction> filesForNiceButtons(L<File> l) {
  ret filesForNiceButtons(l, f -> { thread { genericUI_openFile(f); }});
}

Author comment

Began life as a copy of #1015165

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1015366
Snippet name: filesForNiceButtons
Eternal ID of this version: #1015366/14
Text MD5: cac1d826fcbc852601c171cfdfa29a0b
Transpilation MD5: 966042677277891c27be03087bb0dfc6
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-02-12 23:19:27
Source code size: 466 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 545 / 570
Version history: 13 change(s)
Referenced in: [show references]