item.setTreeTableElement(DOM.createDiv());
item.setStyleName("my-treeitem x-tree-item");
DOM.insertChild(target, item.getElement(), index);
TableColumnModel cm = getTreeTableItem().getTreeTable().getColumnModel();
DOM.setInnerHTML(item.getElement(), Markup.TREETABLE_ITEM);
tableItemEl = item.el().firstChild().dom;
rowTableEl = DOM.getFirstChild(tableItemEl);
rowTrEl = fly(rowTableEl).getSubChild(2);
updateCellValues(0, DOM.getFirstChild(rowTrEl), cm.getColumn(0).getAlignment());
itemEl = fly(rowTrEl).getSubChild(4);
Element td = fly(itemEl).subChild(3).dom;
indentEl = DOM.getFirstChild(td);
jointEl = DOM.getNextSibling(td);
jointDivEl = DOM.getFirstChild(jointEl);
checkEl = DOM.getNextSibling(DOM.getNextSibling(jointEl));
checkDivEl = DOM.getFirstChild(checkEl);
iconEl = DOM.getNextSibling(checkEl);
iconDivEl = DOM.getFirstChild(iconEl);
textEl = DOM.getNextSibling(iconEl);
textSpanEl = DOM.getFirstChild(textEl);
Element tbl = DOM.getFirstChild(item.getElement());
containerEl = new El(DOM.getNextSibling(tbl));
int numColumns = cm.getColumnCount();
cells = new Element[numColumns];
for (int i = 1; i < numColumns; i++) {
cells[i] = DOM.createTD();
DOM.appendChild(rowTrEl, cells[i]);
DOM.setElementProperty(cells[i], "className", "my-treetbl-cell");
DOM.setElementAttribute(cells[i], "index", String.valueOf(i));
Element overflowDiv = DOM.createDiv();
DOM.setElementProperty(overflowDiv, "className", "my-treetbl-cell-overflow");
DOM.appendChild(cells[i], overflowDiv);
Element textDiv = DOM.createDiv();
String textStyle = "my-treetbl-cell-text";
if (((TreeTableItem) item).getCellStyle(i) != null) {
textStyle += " " + ((TreeTableItem) item).getCellStyle(i);
}
DOM.setElementProperty(textDiv, "className", textStyle);
DOM.appendChild(overflowDiv, textDiv);
updateCellValues(i, cells[i], cm.getColumn(i).getAlignment());
}
boolean checkable = getTreeTableItem().getTreeTable().getCheckable();
El.fly(checkEl).setVisible(checkable);