1 /*******************************************************************************
2 * Copyright (c) 2009, 2012 Ericsson
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
10 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.test
.stub
.model
;
14 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeEvent
;
15 import org
.eclipse
.linuxtools
.tmf
.ui
.widgets
.timegraph
.model
.ITimeGraphEntry
;
18 * ITimeEvent implementation for test purposes.
20 @SuppressWarnings("javadoc")
21 public class EventImpl
implements ITimeEvent
{
22 // ========================================================================
24 // ========================================================================
25 public static enum Type
{ERROR
, WARNING
, TIMEADJUSTMENT
, ALARM
, EVENT
, INFORMATION
, UNKNOWN
, INFO1
, INFO2
, INFO3
, INFO4
, INFO5
, INFO6
, INFO7
, INFO8
, INFO9
}
27 private long time
= 0;
28 private ITimeGraphEntry trace
= null;
29 private Type myType
= Type
.UNKNOWN
;
30 private long duration
;
32 // ========================================================================
34 // ========================================================================
35 public EventImpl(long time
, ITimeGraphEntry trace
, Type type
) {
41 // ========================================================================
43 // ========================================================================
44 public Type
getType() {
48 public void setType(Type myType
) {
52 public void setTime(long time
) {
56 public void setTrace(ITimeGraphEntry trace
) {
61 public long getTime() {
66 public ITimeGraphEntry
getEntry() {
71 * @param duration the duration to set
73 public void setDuration(long duration
) {
74 this.duration
= duration
;
78 * @return the duration
81 public long getDuration() {
This page took 0.032314 seconds and 5 git commands to generate.