1

Java's DefaultMutableTreeNode had methods for tree iteration:

  • breadthFirstEnumeration();
  • depthFirstEnumeration();
  • preorderEnumeration();
  • postorderEnumeration();

Is there something similar in JavaFX?

Roland
  • 18,114
  • 12
  • 62
  • 93

1 Answers1

1

No, there are no corresponding built-in APIs in JavaFX 8. You can create your own. There are some examples for depth first search here:

Implementing breadth first search is similar to the linked examples, you just use a Queue data structure instead of a stack.

Feature requests to build such functionality into the JavaFX tree structure can be filed at: https://javafx-jira.kenai.com. The OpenJFX development team might accept a patch which implements these features.

Community
  • 1
  • 1
jewelsea
  • 150,031
  • 14
  • 366
  • 406