protected void buildTree ( ) { treeGrid . setWidth100 ( ) ; treeGrid . setHeight100 ( ) ; treeGrid . setShowHeader ( false ) ; treeGrid . setOverflow ( Overflow . AUTO ) ; tree = new RefreshableTree ( ) ; final TreeNode nodeRoot = new TreeNode ( "ROOT" ) ; tree . setRoot ( nodeRoot ) ; // invisible ROOT node (ROOT node is required) ClientLayerTreeInfo layerTreeInfo = ( ClientLayerTreeInfo ) mapModel . getMapInfo ( ) . getWidgetInfo ( ClientLayerTreeInfo . IDENTIFIER ) ; tree . setRoot ( nodeRoot ) ; // invisible ROOT node (ROOT node is required) if ( layerTreeInfo != null ) { for ( ClientAbstractNodeInfo node : layerTreeInfo . getTreeNode ( ) . getTreeNodes ( ) ) { processNode ( node , nodeRoot , false ) ; } } treeGrid . setData ( tree ) ; treeGrid . addLeafClickHandler ( this ) ; treeGrid . addFolderClickHandler ( this ) ; treeGrid . addFolderClickHandler ( new FolderClickHandler ( ) { @ Override public void onFolderClick ( FolderClickEvent folderClickEvent ) { folderClickEvent . getSource ( ) ; } } ) ; treeGrid . addFolderOpenedHandler ( new FolderOpenedHandler ( ) { @ Override public void onFolderOpened ( FolderOpenedEvent folderOpenedEvent ) { folderOpenedEvent . getSource ( ) ; } } ) ; tree . openFolder ( nodeRoot ) ; syncNodeState ( false ) ; }
Builds up the tree showing the layers .