1 | static bool replaceTreeNodeChildren_withDummyChild(final DefaultMutableTreeNode node, fL children, fO dummyChild) { |
2 | if (node == null) false; |
3 | ret swing(func -> bool { |
4 | L oldChildren = mapMethod('getUserObject, node.children()); |
5 | if (eq(oldChildren, children)) false; |
6 | node.removeAllChildren(); |
7 | for (O c : unnull(children)) { |
8 | DefaultMutableTreeNode node2 = new(c); |
9 | node2.add(new DefaultMutableTreeNode(dummyChild)); |
10 | node.add(node2); |
11 | } |
12 | true; |
13 | }); |
14 | } |
Began life as a copy of #1016036
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: | #1016043 |
Snippet name: | replaceTreeNodeChildren_withDummyChild |
Eternal ID of this version: | #1016043/3 |
Text MD5: | d26666b4faeb804d7bb75e28f8a0f87f |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-19 18:08:28 |
Source code size: | 502 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 368 / 418 |
Version history: | 2 change(s) |
Referenced in: | [show references] |