tmf: Add support for time range selection
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.core / src / org / eclipse / linuxtools / tmf / core / signal / TmfRangeSynchSignal.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 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 * Francois Chouinard - Initial API and implementation
11 * Patrick Tasse - Deprecate current time
12 *******************************************************************************/
13
14 package org.eclipse.linuxtools.tmf.core.signal;
15
16 import org.eclipse.linuxtools.tmf.core.timestamp.ITmfTimestamp;
17 import org.eclipse.linuxtools.tmf.core.timestamp.TmfTimeRange;
18
19 /**
20 * A new time range has been selected.
21 *
22 * This is the visible (zoom) time range. To synchronize on the selection range,
23 * use {@link TmfTimeSynchSignal}.
24 *
25 * @version 1.0
26 * @author Francois Chouinard
27 */
28 public class TmfRangeSynchSignal extends TmfSignal {
29
30 private final TmfTimeRange fCurrentRange;
31
32 /**
33 * Constructor
34 *
35 * @param source
36 * Object sending this signal
37 * @param range
38 * The time range to which we synchronized
39 * @param ts
40 * The current selected timestamp, independent from the time
41 * range (ignored)
42 * @since 2.0
43 * @deprecated As of 2.1, use {@link #TmfRangeSynchSignal(Object, TmfTimeRange)}
44 */
45 @Deprecated
46 public TmfRangeSynchSignal(Object source, TmfTimeRange range, ITmfTimestamp ts) {
47 super(source);
48 fCurrentRange = range;
49 }
50
51 /**
52 * Constructor
53 *
54 * @param source
55 * Object sending this signal
56 * @param range
57 * The new time range
58 * @since 2.1
59 */
60 public TmfRangeSynchSignal(Object source, TmfTimeRange range) {
61 super(source);
62 fCurrentRange = range;
63 }
64
65 /**
66 * @return This signal's time range
67 * @since 2.0
68 */
69 public TmfTimeRange getCurrentRange() {
70 return fCurrentRange;
71 }
72
73 /**
74 * @return This signal's current selected timestamp
75 * @since 2.0
76 * @deprecated As of 2.1, this returns null
77 */
78 @Deprecated
79 public ITmfTimestamp getCurrentTime() {
80 return null;
81 }
82
83 }
This page took 0.034443 seconds and 5 git commands to generate.