Commit | Line | Data |
---|---|---|
8c8bf09f ASL |
1 | /******************************************************************************* |
2 | * Copyright (c) 2009 Ericsson | |
6256d8ad | 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 | |
6256d8ad | 8 | * |
8c8bf09f ASL |
9 | * Contributors: |
10 | * Francois Chouinard - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
6c13869b | 13 | package org.eclipse.linuxtools.tmf.core.signal; |
8c8bf09f | 14 | |
6c13869b FC |
15 | import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange; |
16 | import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; | |
8c8bf09f ASL |
17 | |
18 | /** | |
4b7b3670 | 19 | * A trace was updated (typically its time range) |
6256d8ad | 20 | * |
4b7b3670 FC |
21 | * @version 1.0 |
22 | * @author Francois Chouinard | |
8c8bf09f ASL |
23 | */ |
24 | public class TmfTraceUpdatedSignal extends TmfSignal { | |
25 | ||
6256d8ad | 26 | private final ITmfTrace fTrace; |
4f8ca6a1 AM |
27 | private final TmfTimeRange fTimeRange; |
28 | ||
29 | /** | |
30 | * Constructor | |
31 | * | |
32 | * @param source | |
33 | * Object sending this signal | |
34 | * @param trace | |
35 | * The trace that was updated | |
36 | * @param range | |
37 | * The new time range of the trace | |
38 | */ | |
6256d8ad | 39 | public TmfTraceUpdatedSignal(Object source, ITmfTrace trace, TmfTimeRange range) { |
4f8ca6a1 AM |
40 | super(source); |
41 | fTrace = trace; | |
42 | fTimeRange = range; | |
43 | } | |
44 | ||
45 | /** | |
46 | * @return The trace referred to by this signal | |
47 | */ | |
6256d8ad | 48 | public ITmfTrace getTrace() { |
4f8ca6a1 AM |
49 | return fTrace; |
50 | } | |
51 | ||
52 | /** | |
53 | * @return The time range indicated by this signal | |
54 | */ | |
55 | public TmfTimeRange getRange() { | |
56 | return fTimeRange; | |
57 | } | |
58 | ||
59 | /* | |
60 | * (non-Javadoc) | |
61 | * | |
62 | * @see java.lang.Object#toString() | |
63 | */ | |
64 | @Override | |
3b38ea61 | 65 | @SuppressWarnings("nls") |
4f8ca6a1 AM |
66 | public String toString() { |
67 | return "[TmfTraceUpdatedSignal (" + fTrace.toString() + ", " | |
68 | + fTimeRange.toString() + ")]"; | |
69 | } | |
8c8bf09f ASL |
70 | |
71 | } |