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

5
LINES

< > BotCompany Repo | #1034126 // bindJLabelToTransformedLiveValue

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

Libraryless. Click here for Pure Java version (5583L/31K).

static <A extends JLabel, B> A bindJLabelToTransformedLiveValue(IF1<B, O> f, A label, LiveValue<B> lv) {
  bindLiveValueListenerToComponent(label, lv,
    -> { setText(label, strOrNull(f.get(lv!))); });
  ret label;
}

Author comment

Began life as a copy of #1016975

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034126
Snippet name: bindJLabelToTransformedLiveValue
Eternal ID of this version: #1034126/4
Text MD5: c7aa29a64f04798118ed1dc32ee5bb4d
Transpilation MD5: 2dff416db30833f68b0e4c721e4a79d8
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-23 23:50:08
Source code size: 221 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 130 / 198
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1035033 - bindJLabelToTransformedVar