Field<?> f = ed != null ? ed.getField() : new LabelField();
if (f instanceof TriggerField<?>) {
((TriggerField<? extends Object>) f).setMonitorTab(true);
}
f.setWidth(cm.getColumnWidth(i));
HBoxLayoutData ld = new HBoxLayoutData();
if (i == 0) {
ld.setMargins(new Margins(0, 1, 2, 1));
} else if (i == len - 1) {
ld.setMargins(new Margins(0, 0, 2, 1));
} else {
ld.setMargins(new Margins(0, 1, 2, 2));
}
f.setMessageTarget("tooltip");
f.addStyleName("x-row-editor-field");
// needed because we remove it from the celleditor