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
CommitLineData
8c8bf09f 1/*******************************************************************************
be4a197a 2 * Copyright (c) 2009, 2014 Ericsson
4f8ca6a1 3 *
8c8bf09f
ASL
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
4f8ca6a1 8 *
8c8bf09f
ASL
9 * Contributors:
10 * Francois Chouinard - Initial API and implementation
0fcf3b09 11 * Patrick Tasse - Deprecate current time
8c8bf09f
ASL
12 *******************************************************************************/
13
2bdf0193 14package org.eclipse.tracecompass.tmf.core.signal;
8c8bf09f 15
2bdf0193 16import org.eclipse.tracecompass.tmf.core.timestamp.TmfTimeRange;
8c8bf09f
ASL
17
18/**
97c71024 19 * A new range has been selected for the visible (zoom) time range.
0fcf3b09 20 *
97c71024
AM
21 * To update the selection range instead, use
22 * {@link TmfSelectionRangeUpdatedSignal}.
4f8ca6a1 23 *
4b7b3670 24 * @author Francois Chouinard
97c71024 25 * @since 1.0
8c8bf09f 26 */
97c71024 27public class TmfWindowRangeUpdatedSignal extends TmfSignal {
8c8bf09f 28
c392540b 29 private final TmfTimeRange fCurrentRange;
8c8bf09f 30
0fcf3b09
PT
31 /**
32 * Constructor
33 *
34 * @param source
35 * Object sending this signal
36 * @param range
37 * The new time range
0fcf3b09 38 */
97c71024 39 public TmfWindowRangeUpdatedSignal(Object source, TmfTimeRange range) {
0fcf3b09
PT
40 super(source);
41 fCurrentRange = range;
c392540b 42 }
8c8bf09f 43
4f8ca6a1
AM
44 /**
45 * @return This signal's time range
46 */
c392540b
FC
47 public TmfTimeRange getCurrentRange() {
48 return fCurrentRange;
49 }
8c8bf09f 50
e9681c60
SM
51 @Override
52 public String toString() {
8e22bf26
JCK
53 StringBuilder sb = new StringBuilder(getClass().getSimpleName());
54 sb.append(" [source="); //$NON-NLS-1$
e9681c60
SM
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 }
8c8bf09f 72}
This page took 0.109212 seconds and 5 git commands to generate.