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

10
LINES

< > BotCompany Repo | #1016827 // jDynamicTree_addToNode - returns new child node

JavaX fragment (include)

static DefaultMutableTreeNode jDynamicTree_addToNode(final JTree tree, fO node, fO child) {
  ret swing(func -> DefaultMutableTreeNode {
    DefaultMutableTreeNode n = jDynamicTree_findNode(tree, node);
    if (n == null || jDynamicTree_isInDummyState(n)) null;
    DefaultMutableTreeNode childNode = jDynamicTree_newNode(child);
    n.add(childNode);
    ((DefaultTreeModel) tree.getModel()).nodesWereInserted(n, new int[] { n.getChildCount()-1 });
    ret childNode;
  });
}

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: #1016827
Snippet name: jDynamicTree_addToNode - returns new child node
Eternal ID of this version: #1016827/12
Text MD5: 868d9cb18eb6bdc986598103884d5863
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-04 02:00:13
Source code size: 485 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 352 / 397
Version history: 11 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1016831 - jDynamicTree_findNode
#1016832 - jDynamicTree_addToNodeAndScroll