tmf/lttng: Remove unneeded (non-Javadoc) comments
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / histogram / HistogramTimeRangeControl.java
index 5a8c5cedfe6138ca58eae99c3996e241adb326f3..cbb07f3cf2f2f38323546f42dbca0b2342476dde 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
@@ -16,12 +16,12 @@ package org.eclipse.linuxtools.tmf.ui.views.histogram;
 
 import java.text.ParseException;
 
-import org.eclipse.linuxtools.tmf.core.event.ITmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestamp;
-import org.eclipse.linuxtools.tmf.core.event.TmfTimestampFormat;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalHandler;
 import org.eclipse.linuxtools.tmf.core.signal.TmfSignalManager;
 import org.eclipse.linuxtools.tmf.core.signal.TmfTimestampFormatUpdateSignal;
+import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestamp;
+import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimestampFormat;
 import org.eclipse.swt.widgets.Composite;
 
 /**
@@ -52,9 +52,6 @@ public class HistogramTimeRangeControl extends HistogramTextControl {
         TmfSignalManager.register(this);
     }
 
-    /* (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramTextControl#dispose()
-     */
     @Override
     public void dispose() {
         TmfSignalManager.deregister(this);
@@ -64,12 +61,12 @@ public class HistogramTimeRangeControl extends HistogramTextControl {
     // Operations
     // ------------------------------------------------------------------------
 
-    /*
-     * (non-Javadoc)
-     * @see org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramTextControl#updateValue()
-     */
     @Override
     protected void updateValue() {
+        if (getValue() == Long.MIN_VALUE) {
+            fTextValue.setText(""); //$NON-NLS-1$
+            return;
+        }
         String string = fTextValue.getText();
         long value = getValue();
         try {
@@ -81,8 +78,12 @@ public class HistogramTimeRangeControl extends HistogramTextControl {
 
     @Override
     public void setValue(long time) {
-        ITmfTimestamp ts = new TmfTimestamp(time, ITmfTimestamp.NANOSECOND_SCALE);
-        super.setValue(time, ts.toString(TmfTimestampFormat.getDefaulIntervalFormat()));
+        if (time != Long.MIN_VALUE) {
+            ITmfTimestamp ts = new TmfTimestamp(time, ITmfTimestamp.NANOSECOND_SCALE);
+            super.setValue(time, ts.toString(TmfTimestampFormat.getDefaulIntervalFormat()));
+        } else {
+            super.setValue(time, ""); //$NON-NLS-1$
+        }
     }
 
     // ------------------------------------------------------------------------
This page took 0.024843 seconds and 5 git commands to generate.