Posted By

laurenceosx on 03/27/12


Tagged

groovy Freemind


Versions (?)

Groovy Freemind RecurseNode


 / Published in: Groovy
 

Groovy Freemind RecurseNode

  1. def recurseNode( aNode = null, results = [] ) {
  2. if (aNode == null) { // null means return all nodes from root
  3. aNode = freemind.main.FreeMind.getFrames().find( { it.class.name.equals( 'freemind.main.FreeMind' ) } ).controller.model.rootNode;
  4. }
  5. results << aNode;
  6. if ( aNode?.children ) {
  7. aNode.children.each {
  8. recurseNode( it, results );
  9. }
  10. }
  11. return results;
  12. }

Report this snippet  

You need to login to post a comment.