/* * Isomorphic SmartGWT web presentation layer * Copyright 2000 and beyond Isomorphic Software, Inc. * * OWNERSHIP NOTICE * Isomorphic Software owns and reserves all rights not expressly granted in this source code, * including all intellectual property rights to the structure, sequence, and format of this code * and to all designs, interfaces, algorithms, schema, protocols, and inventions expressed herein. * * If you have any questions, please email
. * * This entire comment must accompany any portion of Isomorphic Software source code that is * copied or moved from this file. */ package com.smartgwt.sample.showcase.client.largetrees; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.types.FetchMode; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.tree.ResultTree; import com.smartgwt.client.widgets.tree.TreeGrid; import com.smartgwt.client.widgets.tree.TreeGridField; import com.google.gwt.core.client.EntryPoint; public class MultiLevelChildPagingSample implements EntryPoint { @Override public void onModuleLoad() { final TreeGrid treeGrid = new TreeGrid(); treeGrid.setDataSource(DataSource.get("hugeTreeOpenNodes")); treeGrid.setDataFetchMode(FetchMode.PAGED); treeGrid.setProgressiveLoading(true); final ResultTree resultTreeProperties = new ResultTree(); resultTreeProperties.setOpenProperty("isOpen"); resultTreeProperties.setChildrenProperty("children"); resultTreeProperties.setCanReturnOpenFolders(true); treeGrid.setDataProperties(resultTreeProperties); treeGrid.setAutoFetchData(true); treeGrid.setShowFilterEditor(true); // Customize appearance. TreeGridField nameField = new TreeGridField("name"); nameField.setCanFilter(true); treeGrid.setFields(nameField); treeGrid.setWidth(500); treeGrid.setHeight(400); treeGrid.setShowOpenIcons(false); treeGrid.setShowDropIcons(false); treeGrid.setNodeIcon("pieces/16/cube_blue.png"); treeGrid.setFolderIcon("pieces/16/cubes_blue.png"); treeGrid.setClosedIconSuffix(""); treeGrid.setShowConnectors(true); treeGrid.draw(); } }