我想在最上面的父树元素中添加一个复选框小部件,如http://www.smartclient.com/smartgwt/showcase/#tree_checkbox
中所示我怎么能通过使用GWT来做到这一点? 我只发现我可以创建一个带有复选框的Tree * Item *并将其添加到Tree:
TreeItem item = new TreeItem(new CheckBox("box"));
但是如何为树本身创建一个框?
答案 0 :(得分:1)
您需要组装自己的小部件,扩展gwt Composite类并在其中包含树/ celltree,flowpanels以及您要添加的任何小部件,如select all复选框。
您应该尝试使用基于 CellTree 的小区窗口小部件 - http://gwt.googleusercontent.com/samples/Showcase/Showcase.html#!CwCellTree
它更加可定制,并确保更好的性能。