Fixed JavaDoc in TMF UI plugin
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / histogram / HistogramCurrentTimeControl.java
1 /*******************************************************************************
2 * Copyright (c) 2011, 2012 Ericsson
3 *
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
8 *
9 * Contributors:
10 * Francois Chouinard - Initial API and implementation
11 * Francois Chouinard - Moved from LTTng to TMF
12 *******************************************************************************/
13
14 package org.eclipse.linuxtools.tmf.ui.views.histogram;
15
16 import org.eclipse.swt.widgets.Composite;
17
18 /**
19 * This control provides a group containing a text control.
20 *
21 * @version 1.0
22 * @author Francois Chouinard
23 */
24 public class HistogramCurrentTimeControl extends HistogramTextControl {
25
26 // ------------------------------------------------------------------------
27 // Construction
28 // ------------------------------------------------------------------------
29
30 /**
31 * Constructor with default group and text value.
32 *
33 * @param parentView A parent histogram view
34 * @param parent A parent composite to draw in
35 * @param textStyle A test style
36 * @param groupStyle A group style
37 */
38 public HistogramCurrentTimeControl(HistogramView parentView, Composite parent, int textStyle, int groupStyle) {
39 this(parentView, parent, textStyle, groupStyle, "", HistogramUtils.nanosecondsToString(0L)); //$NON-NLS-1$
40 }
41
42 /**
43 *
44 * Constructor
45 * @param parentView A parent histogram view
46 * @param parent A parent composite to draw in
47 * @param textStyle A test style
48 * @param groupStyle A group style
49 * @param groupValue A group value
50 * @param textValue A text value
51 */
52 public HistogramCurrentTimeControl(HistogramView parentView, Composite parent, int textStyle, int groupStyle, String groupValue, String textValue) {
53 super(parentView, parent, textStyle, groupStyle, groupValue, textValue);
54 }
55
56 // ------------------------------------------------------------------------
57 // Operations
58 // ------------------------------------------------------------------------
59
60 @Override
61 protected void updateValue() {
62 String stringValue = fTextValue.getText();
63 long value = HistogramUtils.stringToNanoseconds(stringValue);
64
65 if (getValue() != value) {
66 setValue(value);
67 fParentView.updateCurrentEventTime(value);
68 }
69 }
70
71 }
This page took 0.032583 seconds and 6 git commands to generate.