update(series, plot);
}
};
// put it on a panel
FlowPanel panel = new FlowPanel();
panel.add(plot);
HorizontalPanel buttonsPanel = new HorizontalPanel();
buttonsPanel.setSpacing(5);
buttonsPanel.add(new Button("Start", new ClickListener() {
public void onClick(Widget sender) {
updater.scheduleRepeating(1000);
}
}));
buttonsPanel.add(new Button("Stop", new ClickListener() {
public void onClick(Widget sender) {
updater.cancel();
}
}));
panel.add(buttonsPanel);
return panel;
}