loadApi(new Runnable() {
public void run() {
DataTable data = createDataTable();
MotionChart.Options options = MotionChart.Options.create();
options.setSize(600, 200);
final MotionChart widget = new MotionChart(data, options);
widget.addStateChangeHandler(new StateChangeHandler() {
@Override
public void onStateChange(StateChangeEvent event) {
// Unfortunately, when the state change is triggered manually in
// this way, there is no getState() method present on the
// MotionChart object, so we can't use an automatic test. See
// MotionDemo.java
finishTest();
}
});
RootPanel.get().add(widget);
triggerStateChanged(widget.getJso());
}
}, false, MOTION_CHART_ASYNC_DELAY_MS);
}
}