Commit | Line | Data |
---|---|---|
b0d3496e ASL |
1 | /*******************************************************************************\r |
2 | * Copyright (c) 2009 Ericsson\r | |
3 | * \r | |
4 | * All rights reserved. This program and the accompanying materials are\r | |
5 | * made available under the terms of the Eclipse Public License v1.0 which\r | |
6 | * accompanies this distribution, and is available at\r | |
7 | * http://www.eclipse.org/legal/epl-v10.html\r | |
8 | * \r | |
9 | * Contributors:\r | |
10 | * Alvaro Sanchez-Leon - Initial API and implementation\r | |
11 | *******************************************************************************/\r | |
12 | \r | |
2fa130b8 | 13 | package org.eclipse.linuxtools.internal.lttng.ui.viewers.timeAnalysis;\r |
b0d3496e ASL |
14 | \r |
15 | import java.util.EventObject;\r | |
16 | \r | |
17 | public class TmfTimeScaleSelectionEvent extends EventObject {\r | |
18 | \r | |
19 | /**\r | |
20 | * \r | |
21 | */\r | |
22 | private static final long serialVersionUID = -4177428788761351379L;\r | |
23 | \r | |
24 | \r | |
25 | long time0 = 0;\r | |
26 | long time1 = 0;\r | |
27 | long selectedTime = 0;\r | |
28 | int width = 0;\r | |
29 | \r | |
30 | /**\r | |
31 | * \r | |
32 | * @param arg0\r | |
33 | * source of event\r | |
34 | * @param time0\r | |
35 | * time0 the start time\r | |
36 | * @param time1\r | |
37 | * @param width\r | |
38 | * pixels used to draw the width of the time space\r | |
39 | * @param selTime\r | |
40 | * carries the selected time if available otherwise is 0\r | |
41 | */\r | |
42 | public TmfTimeScaleSelectionEvent(Object arg0, long time0, long time1,\r | |
43 | int width, long selTime) {\r | |
44 | super(arg0);\r | |
45 | this.time0 = time0;\r | |
46 | this.time1 = time1;\r | |
47 | this.width = width;\r | |
48 | this.selectedTime = selTime;\r | |
49 | }\r | |
50 | \r | |
dfaf8391 | 51 | /**\r |
0d9a6d76 | 52 | * @return the start time\r |
dfaf8391 | 53 | */\r |
b0d3496e ASL |
54 | public long getTime0() {\r |
55 | return time0;\r | |
56 | }\r | |
57 | \r | |
dfaf8391 | 58 | /**\r |
0d9a6d76 | 59 | * @return the end time\r |
dfaf8391 | 60 | */\r |
b0d3496e ASL |
61 | public long getTime1() {\r |
62 | return time1;\r | |
63 | }\r | |
64 | \r | |
dfaf8391 | 65 | /**\r |
0d9a6d76 | 66 | * @return the selection width\r |
dfaf8391 | 67 | */\r |
b0d3496e ASL |
68 | public int getWidth() {\r |
69 | return width;\r | |
70 | }\r | |
dfaf8391 FC |
71 | \r |
72 | /**\r | |
0d9a6d76 | 73 | * @return the selected time\r |
dfaf8391 FC |
74 | */\r |
75 | public long getSelectedTime() {\r | |
76 | return selectedTime;\r | |
77 | }\r | |
78 | \r | |
b0d3496e | 79 | }\r |