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.model; | |
14 | ||
15 | /** | |
16 | * Generic TimeEvent implementation | |
17 | * | |
18 | * @version 1.0 | |
19 | * @author Patrick Tasse | |
20 | */ | |
21 | public class TimeEvent implements ITimeEvent { | |
22 | protected ITimeGraphEntry fEntry; | |
23 | protected long fTime; | |
24 | protected long fDuration; | |
25 | ||
26 | /** | |
27 | * Standard constructor | |
28 | * | |
29 | * @param entry | |
30 | * The entry matching this event | |
31 | * @param time | |
32 | * The timestamp of this event | |
33 | * @param duration | |
34 | * The duration of the event | |
35 | */ | |
36 | public TimeEvent(ITimeGraphEntry entry, long time, long duration) { | |
37 | fEntry = entry; | |
38 | fTime = time; | |
39 | fDuration = duration; | |
40 | } | |
41 | ||
42 | @Override | |
43 | public ITimeGraphEntry getEntry() { | |
44 | return fEntry; | |
45 | } | |
46 | ||
47 | @Override | |
48 | public long getTime() { | |
49 | return fTime; | |
50 | } | |
51 | ||
52 | @Override | |
53 | public long getDuration() { | |
54 | return fDuration; | |
55 | } | |
56 | } |