Commit | Line | Data |
---|---|---|
6b44794a MK |
1 | /******************************************************************************* |
2 | * Copyright (c) 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 | * Patrick Tasse - Initial API and implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.core.signal; | |
14 | ||
15 | import org.eclipse.linuxtools.tmf.core.event.ITmfEvent; | |
16 | ||
17 | /** | |
18 | * Signal indicating a trace event has been selected. | |
19 | * | |
20 | * The specified event has been selected. | |
21 | * | |
22 | * @author Patrick Tasse | |
23 | * @since 3.2 | |
24 | */ | |
25 | public class TmfEventSelectedSignal extends TmfSignal { | |
26 | ||
27 | private final ITmfEvent fEvent; | |
28 | ||
29 | /** | |
30 | * Constructor | |
31 | * | |
32 | * @param source | |
33 | * Object sending this signal | |
34 | * @param event | |
35 | * The event that was selected | |
36 | */ | |
37 | public TmfEventSelectedSignal(Object source, ITmfEvent event) { | |
38 | super(source); | |
39 | fEvent = event; | |
40 | } | |
41 | ||
42 | /** | |
43 | * @return The event referred to by this signal | |
44 | */ | |
45 | public ITmfEvent getEvent() { | |
46 | return fEvent; | |
47 | } | |
48 | ||
49 | @Override | |
50 | public String toString() { | |
51 | return "[TmfEventSelectedSignal (" + fEvent.toString() + ")]"; //$NON-NLS-1$ //$NON-NLS-2$ | |
52 | } | |
53 | } |