如何关闭所有分支

How to close all branches in

我尝试关闭 qx.ui.treevirtual.TreeVirtual 树中的所有分支

 this._tree.addListener( "dblclick", function( e )
 {
     for( var i = 0; i< this._tree.getDataModel().getRowCount(); i++ )
     {
        var child = this._tree.getDataModel().getNode( i );
        if( child.level == 1 && child.bOpened == true )
        {
           this._tree.nodeSetOpened( i, false );
        }
     }
}, this );

但是它说 nodeSetOpened 不是函数

nodeSetOpenedqx.ui.treevirtual.MNode mixin 提供的方法。在应用程序的 main() 方法的顶部附近,添加此代码以包含 mixin`:

// We want to use some of the high-level node operation convenience // methods rather than manually digging into the TreeVirtual helper // classes. Include the mixin that provides them. qx.Class.include(qx.ui.treevirtual.TreeVirtual, qx.ui.treevirtual.MNode);