}
});
}
public void addSchedulingStateCell(final T currentElement) {
final SchedulingState schedulingState = getSchedulingStateFrom(currentElement);
SchedulingStateToggler schedulingStateToggler = new SchedulingStateToggler(
schedulingState);
schedulingStateToggler.setReadOnly(readOnly
|| currentElement.isUpdatedFromTimesheets());
final Treecell cell = addCell(
getDecorationFromState(getSchedulingStateFrom(currentElement)),
schedulingStateToggler);
cell.addEventListener("onDoubleClick", new EventListener() {
@Override
public void onEvent(Event event) {
markModifiedTreeitem((Treerow) cell.getParent());
onDoubleClickForSchedulingStateCell(currentElement);
}
});
cell.addEventListener(Events.ON_CLICK, new EventListener() {
private Treeitem item = (Treeitem) getCurrentTreeRow().getParent();
@Override
public void onEvent(Event event) {
item.getTree().toggleItemSelection(item);
}
});
schedulingState.addTypeChangeListener(
new ITypeChangedListener() {
@Override
public void typeChanged(Type newType) {
cell.setSclass(getDecorationFromState(schedulingState));