RootPanel.get("btnSetRange").add(btnSetRange);
RootPanel.get("lblCustomTime").add(lblCustomTime);
RootPanel.get("chkConfirmChange").add(chkConfirmChange);
RootPanel.get("btnRedraw").add(btnRedraw);
btnRedraw.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
timeline.redraw();
}
});
RootPanel.get("btnAddData").add(btnAddData);
btnAddData.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
int i = data.getNumberOfRows();
data.addRows(1);
data.setValue(i, 0, dtf.parse("2010-08-23"));
data.setValue(i, 1, dtf.parse("2010-08-30"));
data.setValue(i, 2, "Added");
timeline.setData(data);
timeline.redraw();
}
});
// Add a handler to the add button
btnSetRange.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
setRange();
}
});