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)

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

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: 351 / 396
Version history: 11 change(s)
Referenced in: [show references]