}
public void onModelChange(GraphCalloutModel m) {
canvas.clear();
if (m.isSelected()) {
TimeLineModel timelineModel = mainTimeline.getModel();
double pixelsPerDomain = mainTimeline.getCurrentGraphWidth()
/ (timelineModel.getRightBound() - timelineModel.getLeftBound());
int xPosition = (int) ((m.getStartTime() - timelineModel.getLeftBound()) * pixelsPerDomain);
// Compute the duration as pixels, and only display the
// duration block if it exceeds a minimum size.
double durationPixels = m.getDuration() * pixelsPerDomain;
label.setInnerHTML(m.getDescription() + " @"
+ TimeStampFormatter.format(m.getStartTime()));