tmf: Fix the actual end time of state system modules
[deliverable/tracecompass.git] / tmf / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / signal / TmfWindowRangeUpdatedSignal.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2014 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.tracecompass.tmf.core.signal;
15
16 import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
17
18 /**
19 * A new range has been selected for the visible (zoom) time range.
20 *
21 * To update the selection range instead, use
22 * {@link TmfSelectionRangeUpdatedSignal}.
23 *
24 * @author Francois Chouinard
25 * @since 1.0
26 */
27 public class TmfWindowRangeUpdatedSignal extends TmfSignal {
28
29 private final TmfTimeRange fCurrentRange;
30
31 /**
32 * Constructor
33 *
34 * @param source
35 * Object sending this signal
36 * @param range
37 * The new time range
38 */
39 public TmfWindowRangeUpdatedSignal(Object source, TmfTimeRange range) {
40 super(source);
41 fCurrentRange = range;
42 }
43
44 /**
45 * @return This signal's time range
46 */
47 public TmfTimeRange getCurrentRange() {
48 return fCurrentRange;
49 }
50
51 @Override
52 public String toString() {
53 StringBuilder sb = new StringBuilder(getClass().getSimpleName());
54 sb.append(" [source="); //$NON-NLS-1$
55
56 if (getSource() != null) {
57 sb.append(getSource().toString());
58 } else {
59 sb.append("null"); //$NON-NLS-1$
60 }
61
62 sb.append(", range="); //$NON-NLS-1$
63
64 if (fCurrentRange != null) {
65 sb.append(fCurrentRange.toString());
66 } else {
67 sb.append("null"); //$NON-NLS-1$
68 }
69 sb.append(']');
70 return sb.toString();
71 }
72 }
This page took 0.032526 seconds and 5 git commands to generate.