swt - JFace:ITreeContentProvider 和 ILazyTreeContentProvider 的区别

标签 swt jface

阅读后JavaDoc for ILazyTreeContentProviderVirtual Tables and Trees我有点困惑。他们真的是用一个简单的 ITreeContentProvider 来表达这个意思吗?创建树时必须加载所有元素?我预计 getChildren()只会在扩展元素时被调用(和 hasChildren() 被调用以确定是否应该显示加号)。或者它们是否适用于某些元素有多个子元素的情况?

最佳答案

找到 this :

Support for SWT.VIRTUAL trees - see bug 112000. Note that all along, TreeViewer implemented lazy trees: the tree content provider's getChildren() method is only called when the user expands a node. The virtual tree viewer is helpful if there are lots of children per parent, or if it expensive to compute the information needed for each child.

关于swt - JFace:ITreeContentProvider 和 ILazyTreeContentProvider 的区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2709408/

相关文章:

java - SWT 应用程序从 Eclipse IDE 运行,当我通过 Maven 创建 jar 并运行时不运行。给出 UnsatisfiedlinkException

java - SWT/JFace TreeColumn 重新排序 - setMoveable() 问题

java - 如何在 Eclipse RCP 3.x 中设置向导窗口的标题?

java - 在 JFace 查看器中反射(reflect)数据更改的正确方法

java - SWTBot 拖动鼠标

java - SWT Filedialog 打开主文件夹

java - 如何更改 JFace 向导对话框中的“后退”和“下一步”按钮位置?

eclipse-rcp - 在 View 的 ToolBarManager 中添加下拉菜单

Java SWT 表格单元格比较

java - 创建具有相同宽度的项目的工具栏