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

5
LINES

< > BotCompany Repo | #1016667 // bindTextComponentToLiveValue_bothWays

JavaX fragment (include)

static <A extends JTextComponent> A bindTextComponentToLiveValue_bothWays(A tc, SimpleLiveValue<S> lv) {
  bindLiveValueListenerToComponent(tc, lv, r { setTextKeepCaret(tc, lv!) });
  onChange(tc, r { lv.set(getText(tc)) });
  ret tc;
}

Author comment

Began life as a copy of #1015821

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1016667
Snippet name: bindTextComponentToLiveValue_bothWays
Eternal ID of this version: #1016667/4
Text MD5: a9f947d04c81a37fcc855c8eeae7642b
Author: stefan
Category: javax / a.i.
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-03 14:11:36
Source code size: 240 bytes / 5 lines
Pitched / IR pitched: No / No
Views / Downloads: 416 / 474
Version history: 3 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1018358 - bindTextComponentToIntLiveValue (both ways)
#1034684 - bindTextComponentToVarWithNotify (both ways)
#1035175 - bindTextComponentToLiveValue_bothWays_noInitialUndo