Remove bookmarks file on drag&drop trace copy.
[deliverable/tracecompass.git] / org.eclipse.linuxtools.tmf.ui.tests / widgetStubs / org / eclipse / linuxtools / tmf / ui / widgets / timeAnalysis / test / stub / model / TraceImpl.java
1 /*******************************************************************************
2 * Copyright (c) 2009, 2010 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 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.linuxtools.tmf.ui.widgets.timeAnalysis.test.stub.model;
13
14 import java.util.Iterator;
15 import java.util.Vector;
16
17 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;
18 import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITmfTimeAnalysisEntry;
19
20 @SuppressWarnings("nls")
21 public class TraceImpl implements ITmfTimeAnalysisEntry {
22 // ========================================================================
23 // Data
24 // ========================================================================
25 private int id = 0;
26 private String name = "traceDefaultName";
27 private long startTime = 0;
28 private long stopTime = 1;
29 private String groupName = "defaultGroupName";
30 private String className = "defaultClassName";
31 private Vector<ITimeEvent> traceEvents = new Vector<ITimeEvent>();
32
33 // ========================================================================
34 // Constructor
35 // ========================================================================
36
37 public TraceImpl(int id, String name, long sTime, long stopTime,
38 String groupName, String className) {
39 this.id = id;
40 this.name = name;
41 this.startTime = sTime;
42 this.stopTime = stopTime;
43 this.groupName = groupName;
44 this.className = className;
45 }
46
47 // ========================================================================
48 // Methods
49 // ========================================================================
50
51 public String getClassName() {
52 return className;
53 }
54
55 public void setClassName(String className) {
56 this.className = className;
57 }
58
59 public void setGroupName(String groupName) {
60 this.groupName = groupName;
61 }
62
63 public void setId(int id) {
64 this.id = id;
65 }
66
67 public void setName(String name) {
68 this.name = name;
69 }
70
71 public void setStartTime(long startTime) {
72 this.startTime = startTime;
73 }
74
75 public void setStopTime(long stopTime) {
76 this.stopTime = stopTime;
77 }
78
79 @Override
80 public String getGroupName() {
81 return groupName;
82 }
83
84 @Override
85 public int getId() {
86 return id;
87 }
88
89 @Override
90 public String getName() {
91 return name;
92 }
93
94 @Override
95 public long getStartTime() {
96 return startTime;
97 }
98
99 @Override
100 public long getStopTime() {
101 return stopTime;
102 }
103
104 @Override
105 @Deprecated public Vector<ITimeEvent> getTraceEvents() {
106 return traceEvents;
107 }
108
109 @Override
110 public Iterator<ITimeEvent> getTraceEventsIterator() {
111 return traceEvents.iterator();
112 }
113
114 @Override
115 public Iterator<ITimeEvent> getTraceEventsIterator(long startTime, long stopTime, long maxDuration) {
116 return traceEvents.iterator();
117 }
118
119 @Override
120 public void addTraceEvent(ITimeEvent event) {
121 traceEvents.add(event);
122 }
123
124 }
This page took 0.039879 seconds and 5 git commands to generate.