TMF: Add vertical events (links) to time graph view
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui / src / org / eclipse / linuxtools / tmf / ui / views / callstack / CallStackEvent.java
1 /*******************************************************************************
2 * Copyright (c) 2013 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.views.callstack;
14
15 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.TimeEvent;
16
17 /**
18 * Time Event implementation specific to the Call Stack View
19 *
20 * @author Patrick Tasse
21 * @since 2.0
22 */
23 public class CallStackEvent extends TimeEvent {
24
25 private int fValue = -1;
26
27 /**
28 * Standard constructor
29 *
30 * @param entry
31 * The entry that this event affects
32 * @param time
33 * The start time of the event
34 * @param duration
35 * The duration of the event
36 * @param value
37 * The event value (1-256)
38 */
39 public CallStackEvent(CallStackEntry entry, long time, long duration, int value) {
40 super(entry, time, duration);
41 fValue = value;
42 }
43
44 /**
45 * Retrieve the value associated with this event
46 *
47 * @return The integer value
48 */
49 @Override
50 public int getValue() {
51 return fValue;
52 }
53
54 @Override
55 public String toString() {
56 return getClass().getSimpleName() + " start=" + getTime() + " end=" + (getTime() + getDuration()) + " duration=" + getDuration() + " value=" + fValue; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
57 }
58 }
This page took 0.037927 seconds and 5 git commands to generate.