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

8
LINES

< > BotCompany Repo | #1001636 // scanForComponents

JavaX fragment (include)

static <A> void scanForComponents(final Component c, final Class<A> theClass, fL<A> l) {
  if (theClass.isInstance(c))
    l.add((A) c);
  if (c instanceof Container) swing {
    for (Component comp : ((Container) c).getComponents())
      scanForComponents(comp, theClass, l);
  }
}

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: #1001636
Snippet name: scanForComponents
Eternal ID of this version: #1001636/3
Text MD5: 3a1d511a7b7b4f713343f835d6300b2b
Author: stefan
Category:
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-11-15 03:12:20
Source code size: 290 bytes / 8 lines
Pitched / IR pitched: No / No
Views / Downloads: 730 / 1739
Version history: 2 change(s)
Referenced in: #1002427 - Accellerating 629 (SPIKE)
#1006619 - childrenOfType
#1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1007187 - printComponentTree
#1015817 - scanForComponentsByShortName
#1019636 - getChildren
#3000382 - Answer for ferdie (>> t = 1, f = 0)