});
argsListbox.setItemRenderer(new ListitemRenderer() {
public void render(Listitem item, Object data) throws Exception {
final ArgWrapper arg = (ArgWrapper)data;
item.setValue(arg);
item.appendChild(new Listcell(arg.getName()));
final Textbox tb = new Textbox(arg.getValue());
inputs.add(tb);
tb.addEventListener(Events.ON_CHANGE, new EventListener() {
public void onEvent(Event event) throws Exception {
arg.setValue(tb.getValue());
composeFormula();
moveFocusToNext(tb);
movedToNext = false;
}
});
tb.addEventListener(Events.ON_FOCUS, new EventListener() {
public void onEvent(Event event) throws Exception {
ArgWrapper last = args.get(args.size() - 1);
if (last.equals(arg) && info.isMultipleParameter()) {
focusToIndex = args.size() - 1;
args.add(createNextArg());
argsListbox.setModel(newListModelInstance(args));
} else {
focusComponent = tb;
}
if (movedToNext == true && focusComponent != null)
focusComponent.focus();
movedToNext = false;
}
});
Listcell cell = new Listcell();
cell.appendChild(tb);
item.appendChild(cell);
}
@Override
public void render(Listitem item, Object data, int index)