JavaFX树中的广度,深度,预搜索 [英] Breadth-, Depth-, Preorder-Search in JavaFX Tree
问题描述
Java的DefaultMutableTreeNode具有用于树迭代的方法:
Java's DefaultMutableTreeNode had methods for tree iteration:
- breadthFirstEnumeration();
- depthFirstEnumeration();
- preorderEnumeration();
- postorderEnumeration();
JavaFX中是否有类似的东西?
Is there something similar in JavaFX?
推荐答案
否,JavaFX 8中没有相应的内置API.您可以创建自己的API.这里有一些深度优先搜索的示例:
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:
实现广度优先搜索与链接的示例相似,只是使用Queue数据结构而不是堆栈.
Implementing breadth first search is similar to the linked examples, you just use a Queue data structure instead of a stack.
将此类功能构建到JavaFX树结构中的功能请求可以在以下位置提交: https://javafx-jira .kenai.com . OpenJFX开发团队可以接受实现这些功能的补丁.
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.
这篇关于JavaFX树中的广度,深度,预搜索的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!