Commit | Line | Data |
---|---|---|
6151d86c | 1 | /******************************************************************************* |
faa38350 | 2 | * Copyright (c) 2012 Ericsson |
6151d86c PT |
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.core.signal; | |
14 | ||
15 | import org.eclipse.linuxtools.tmf.core.trace.ITmfTrace; | |
16 | ||
17 | /** | |
faa38350 PT |
18 | * Signal indicating a trace has been selected. |
19 | * | |
20 | * The specified trace is the active trace and has been brought to top | |
21 | * or the signal is used as a trigger to bring it to top. | |
6151d86c PT |
22 | * |
23 | * @version 1.0 | |
24 | * @author Patrick Tasse | |
25 | */ | |
26 | public class TmfTraceSelectedSignal extends TmfSignal { | |
27 | ||
28 | private final ITmfTrace fTrace; | |
29 | ||
30 | /** | |
31 | * Constructor | |
32 | * | |
33 | * @param source | |
34 | * Object sending this signal | |
35 | * @param trace | |
36 | * The trace that was selected | |
37 | */ | |
38 | public TmfTraceSelectedSignal(Object source, ITmfTrace trace) { | |
39 | super(source); | |
40 | fTrace = trace; | |
41 | } | |
42 | ||
43 | /** | |
44 | * @return The trace referred to by this signal | |
45 | */ | |
46 | public ITmfTrace getTrace() { | |
47 | return fTrace; | |
48 | } | |
49 | ||
50 | @Override | |
51 | public String toString() { | |
52 | return "[TmfTraceSelectedSignal (" + fTrace.getName() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$ | |
53 | } | |
54 | } |