tmf/lttng: Remove unneeded (non-Javadoc) comments
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / histogram / TimeRangeHistogram.java
index 1b0a45628214aabdb07c45fea88793e044e05f11..3aed94c38c595abc41e5a27aae7953b4e250feeb 100644 (file)
@@ -1,5 +1,5 @@
 /*******************************************************************************
- * 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
@@ -17,7 +17,6 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 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>
@@ -53,23 +52,16 @@ public class TimeRangeHistogram extends Histogram {
     // 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();
     }
@@ -81,6 +73,9 @@ public class TimeRangeHistogram extends Histogram {
      */
     public synchronized void setTimeRange(long startTime, long duration) {
         fZoom.setNewRange(startTime, duration);
+        if (getDataModel().getNbEvents() == 0) {
+            getDataModel().setTimeRange(startTime, startTime + duration);
+        }
     }
 
     /**
This page took 0.026243 seconds and 5 git commands to generate.