1 /*******************************************************************************
2 * Copyright (c) 2011 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Francois Chouinard - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.lttng
.ui
.views
.histogram
;
15 import org
.eclipse
.swt
.widgets
.Composite
;
18 * <b><u>HistogramCurrentTimeControl</u></b>
20 * This control provides a group containing a text control.
22 public class HistogramCurrentTimeControl
extends HistogramTextControl
{
24 // ------------------------------------------------------------------------
26 // ------------------------------------------------------------------------
28 public HistogramCurrentTimeControl(HistogramView parentView
, Composite parent
, int textStyle
, int groupStyle
) {
29 this(parentView
, parent
, textStyle
, groupStyle
, "", HistogramUtils
.nanosecondsToString(0L)); //$NON-NLS-1$
32 public HistogramCurrentTimeControl(HistogramView parentView
, Composite parent
, int textStyle
, int groupStyle
, String groupValue
, String textValue
) {
33 super(parentView
, parent
, textStyle
, groupStyle
, groupValue
, textValue
);
36 // ------------------------------------------------------------------------
38 // ------------------------------------------------------------------------
41 protected void updateValue() {
42 String stringValue
= fTextValue
.getText();
43 long value
= HistogramUtils
.stringToNanoseconds(stringValue
);
45 if (getValue() != value
) {
47 fParentView
.updateCurrentEventTime(value
);