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

10
LINES

< > BotCompany Repo | #1016831 // jDynamicTree_findNode

JavaX fragment (include)

static DefaultMutableTreeNode jDynamicTree_findNode(final JTree tree, fO data) {
  ret swing(func -> DefaultMutableTreeNode {
    Enumeration e = ((DefaultMutableTreeNode) tree.getModel().getRoot()).breadthFirstEnumeration();
    while (e.hasMoreElements()) {
      DefaultMutableTreeNode n = cast e.nextElement();
      if (eq(n.getUserObject(), data)) ret n;
    }
    null;
  });
}

Author comment

Began life as a copy of #1016827

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: #1016831
Snippet name: jDynamicTree_findNode
Eternal ID of this version: #1016831/3
Text MD5: 4bc21c43ad859ac35bb1ef7de341c0fe
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-07-03 16:37:23
Source code size: 393 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 390 / 428
Version history: 2 change(s)
Referenced in: [show references]