Commit | Line | Data |
---|---|---|
be222f56 | 1 | /******************************************************************************* |
576f0a4e | 2 | * Copyright (c) 2012, 2014 Ericsson |
be222f56 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 | ||
2bdf0193 | 13 | package org.eclipse.tracecompass.tmf.ui.widgets.timegraph; |
be222f56 PT |
14 | |
15 | import java.util.EventObject; | |
16 | ||
17 | /** | |
0fcf3b09 | 18 | * Time selection event |
be222f56 | 19 | * |
be222f56 PT |
20 | * @author Patrick Tasse |
21 | */ | |
22 | public class TimeGraphTimeEvent extends EventObject { | |
23 | ||
24 | /** | |
25 | * Default serial version UID for this class. | |
be222f56 PT |
26 | */ |
27 | private static final long serialVersionUID = 1L; | |
28 | ||
29 | /** | |
0fcf3b09 | 30 | * The selection begin time. |
be222f56 | 31 | */ |
0fcf3b09 PT |
32 | private final long fBeginTime; |
33 | ||
34 | /** | |
35 | * The selection end time. | |
36 | */ | |
37 | private final long fEndTime; | |
be222f56 | 38 | |
0fcf3b09 PT |
39 | /** |
40 | * Standard constructor | |
41 | * | |
42 | * @param source | |
43 | * The source of this event | |
44 | * @param beginTime | |
45 | * The selection begin time | |
46 | * @param endTime | |
47 | * The selection end time | |
0fcf3b09 PT |
48 | */ |
49 | public TimeGraphTimeEvent(Object source, long beginTime, long endTime) { | |
50 | super(source); | |
51 | fBeginTime = beginTime; | |
52 | fEndTime = endTime; | |
be222f56 PT |
53 | } |
54 | ||
0fcf3b09 PT |
55 | /** |
56 | * @return the selection begin time | |
0fcf3b09 PT |
57 | */ |
58 | public long getBeginTime() { | |
59 | return fBeginTime; | |
60 | } | |
61 | ||
62 | /** | |
63 | * @return the selection end time | |
0fcf3b09 PT |
64 | */ |
65 | public long getEndTime() { | |
66 | return fEndTime; | |
be222f56 PT |
67 | } |
68 | ||
69 | } |