tmf: Move plugins to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / widgets / timegraph / TimeGraphSelectionEvent.java
1 /*******************************************************************************
2 * Copyright (c) 2012 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.ui.widgets.timegraph;
14
15 import java.util.EventObject;
16
17 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;
18
19 /**
20 * Notifier for the time graph that an object in the views has been selected.
21 *
22 * @version 1.0
23 * @author Patrick Tasse
24 */
25 public class TimeGraphSelectionEvent extends EventObject {
26
27 /**
28 * Default serial version UID for this class.
29 * @since 1.0
30 */
31 private static final long serialVersionUID = 1L;
32
33 /**
34 * The selected entry.
35 */
36 private final ITimeGraphEntry fSelection;
37
38 /**
39 * Standard constructor
40 *
41 * @param source
42 * The source of this event
43 * @param selection
44 * The entry that was selected
45 */
46 public TimeGraphSelectionEvent(Object source, ITimeGraphEntry selection) {
47 super(source);
48 fSelection = selection;
49 }
50
51 /**
52 * @return the selected entry or null if the selection is empty.
53 */
54 public ITimeGraphEntry getSelection() {
55 return fSelection;
56 }
57
58 }
This page took 0.031999 seconds and 5 git commands to generate.