table.setWidget(row, 1, nodes);
nodes.setText("2000");
table.setTitle("Number of nodes");
final ListBox type = new ListBox();
type.addItem("Text");
type.addItem("HTML");
type.addItem("CheckBox");
type.setSelectedIndex(1);
table.setWidget(row, 2, type);
++row;
final int widgetRow = row + 1;
table.setWidget(row, 0, new Button("Normal tree", new ClickListener() {
public void onClick(Widget sender) {
long time = System.currentTimeMillis();
Tree t = new Tree();
profileCreateTree(t, Integer.parseInt(branches.getText()),
Integer.parseInt(nodes.getText()),
TreeType.getType(type.getSelectedIndex()));
table.setWidget(widgetRow, 0, t);
Window.alert("Elapsed time: " + (System.currentTimeMillis() - time));
}
}));
table.setWidget(row, 1, new Button("Fast tree", new ClickListener() {
public void onClick(Widget sender) {
long time = System.currentTimeMillis();
FastTree t = new FastTree();
profileCreateTree(t, Integer.parseInt(branches.getText()),
Integer.parseInt(nodes.getText()),
TreeType.getType(type.getSelectedIndex()));
table.setWidget(widgetRow, 1, t);
Window.alert("Elapsed time: " + (System.currentTimeMillis() - time));
}
}));
++row;