TreeNodeBinder(Tree tree, TreeStore<TreeNode> store) {
super(tree, store);
}
protected TreeItem createItem(TreeNode model) {
TreeItem item = super.createItem(model);
XObject xObj = model.getXObject();
//check type:
String name = xObj.getName();
if(name == null || name.equals(""))
item.setText(constants.notDefined());
//set icon:
String type = xObj.getType();
if(type.equals(XAccount.TYPE)) {
XAccount xAcc = (XAccount) xObj;
item.setText(xAcc.getUser().getLogin()+" - "+xAcc.getConnection().getName());
item.setIconStyle("icon-account");
}
return item;
}