fireEvent(Events.Refresh);
}
protected TreeItem createItem(M model) {
int cols = treeTable.getColumnCount();
TreeTableItem item = new TreeTableItem(new Object[cols]);
setModel(item, model);
updateItemValues(item);
updateItemStyles(item);
String txt = getTextValue(model, displayProperty);
if (txt == null && displayProperty != null) {
txt = model.get(displayProperty);
} else {
txt = model.toString();
}
String icon = getIconValue(model, displayProperty);
item.setIconStyle(icon);
item.setText(txt);
if (loader != null) {
item.setLeaf(!loader.hasChildren(model));
} else {
item.setLeaf(!hasChildren(model));
}
return item;
}