c9e6913612b72a6c91c0ec348a307c35240829d0
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / histogram / HistogramSelectionEndControl.java
1 /*******************************************************************************
2 * Copyright (c) 2013 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 * Patrick Tasse - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.tmf.ui.views.histogram;
14
15 import org.eclipse.swt.widgets.Composite;
16
17 /**
18 * Text control for selection end time
19 *
20 * @since 2.2
21 */
22 public class HistogramSelectionEndControl extends HistogramCurrentTimeControl {
23
24 /**
25 * Standard constructor
26 *
27 * @param parentView A parent histogram view
28 * @param parent A parent composite to draw in
29 * @param label A label
30 * @param value A value
31 */
32 public HistogramSelectionEndControl(HistogramView parentView, Composite parent, String label, long value) {
33 super(parentView, parent, label, value);
34 }
35
36 @Override
37 protected void updateSelectionTime(long time) {
38 long begin = Math.min(fParentView.getSelectionBegin(), time);
39 long end = Math.max(fParentView.getSelectionBegin(), time);
40 fParentView.updateSelectionTime(begin, end);
41 }
42
43 }
This page took 0.041754 seconds and 4 git commands to generate.