0
我在java gwt中實現了一個CellTree結構,當單擊單元格中的小箭頭時,它會打開它的子元素。當單擊單元格本身而不是明確指向箭頭時,是否可以打開子樹?java gwt celltree
public class SomeCellTree extends Composite {
private SelectionModel selectionModel;
private CellTree cellTree;
private class SomeTreeViewModel implements TreeViewModel {
@Override
public <T> NodeInfo<?> getNodeInfo(T value) {
...
}
@Override
public boolean isLeaf(Object value) {
...
}
}
public SomeCellTree(...) {
this.selectionModel = new SingleSelectionModel();
this.selectionModel.addSelectionChangeHandler(new SelectionChangeEvent.Handler() {
@Override
public void onSelectionChange(SelectionChangeEvent event) {
...
}
});
cellTree = new CellTree(new SomeTreeViewModel(),null,RESOURCES);
initWidget(cellTree);
}
}