/*******************************************************************************
- * Copyright (c) 2011, 2012 Ericsson
+ * Copyright (c) 2011, 2013 Ericsson
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
import org.eclipse.swt.widgets.Composite;
/**
- * <p>
* A basic histogram widget that displays the event distribution of a specific time range of a trace.
* It has the following additional features:
* <ul>
// Operations
// ------------------------------------------------------------------------
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.histogram.Histogram#updateTimeRange(long, long)
- */
@Override
public void updateTimeRange(long startTime, long endTime) {
((HistogramView) fParentView).updateTimeRange(startTime, endTime);
}
- /*
- * (non-Javadoc)
- * @see org.eclipse.linuxtools.tmf.ui.views.histogram.Histogram#clear()
- */
@Override
public synchronized void clear() {
if (fZoom != null) {
- fZoom.stop();
+ fZoom.setFullRange(0L, 0L);
+ fZoom.setNewRange(0L, 0L);
}
super.clear();
}
*/
public synchronized void setTimeRange(long startTime, long duration) {
fZoom.setNewRange(startTime, duration);
+ if (getDataModel().getNbEvents() == 0) {
+ getDataModel().setTimeRange(startTime, startTime + duration);
+ }
}
/**