Commit | Line | Data |
---|---|---|
be222f56 PT |
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 view that a tree has been expanded. | |
21 | * | |
22 | * @version 1.0 | |
23 | * @author Patrick Tasse | |
24 | */ | |
25 | public class TimeGraphTreeExpansionEvent 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 entry that was expanded or collapsed. | |
35 | */ | |
36 | private final ITimeGraphEntry fEntry; | |
37 | ||
38 | /** | |
39 | * Creates a new event for the given source and entry. | |
40 | * | |
41 | * @param source the tree viewer | |
42 | * @param entry the entry | |
43 | */ | |
44 | public TimeGraphTreeExpansionEvent(Object source, ITimeGraphEntry entry) { | |
45 | super(source); | |
46 | fEntry = entry; | |
47 | } | |
48 | ||
49 | /** | |
50 | * Returns the entry that got expanded or collapsed. | |
51 | * | |
52 | * @return the entry | |
53 | */ | |
54 | public ITimeGraphEntry getEntry() { | |
55 | return fEntry; | |
56 | } | |
57 | } |