use of org.zkoss.zul.Treecell in project spatial-portal by AtlasOfLivingAustralia.
the class PortalEvent method getTarget.
/**
* Get the treeItem marked as target in the event
*
* @param event
* @return
*/
protected Treeitem getTarget(Event event) {
Treecell treecell = (Treecell) event.getTarget();
Treerow treerow;
Treeitem target = null;
if (treecell != null) {
treerow = (Treerow) treecell.getParent();
if (treerow != null) {
target = (Treeitem) treerow.getParent();
}
}
return target;
}
use of org.zkoss.zul.Treecell in project adempiere by adempiere.
the class SimpleTreeModel method render.
/**
* @param ti
* @param node
*/
public void render(Treeitem ti, Object node, int index) {
Treecell tc = new Treecell(Objects.toString(node));
Treerow tr = null;
if (ti.getTreerow() == null) {
tr = new Treerow();
tr.setParent(ti);
if (isItemDraggable()) {
tr.setDraggable("true");
}
if (!onDropListners.isEmpty()) {
tr.setDroppable("true");
tr.addEventListener(Events.ON_DROP, this);
}
} else {
tr = ti.getTreerow();
tr.getChildren().clear();
}
tc.setParent(tr);
ti.setValue(node);
}