Commit | Line | Data |
---|---|---|
72eda778 ASL |
1 | /*******************************************************************************\r |
2 | * Copyright (c) 2009, 2010 Ericsson\r | |
64636df8 | 3 | *\r |
72eda778 ASL |
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 | |
64636df8 | 8 | *\r |
72eda778 ASL |
9 | * Contributors:\r |
10 | * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation\r | |
11 | *******************************************************************************/\r | |
fb5cad3d | 12 | package org.eclipse.linuxtools.tmf.ui.widgets.timegraph.test.stub.adaption;\r |
f6281059 ASL |
13 | \r |
14 | import java.util.HashMap;\r | |
15 | import java.util.Map;\r | |
16 | \r | |
b83af2c3 | 17 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider;\r |
2fa130b8 | 18 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r |
fb5cad3d | 19 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.test.stub.model.EventImpl;\r |
f6281059 | 20 | \r |
64636df8 BH |
21 | /**\r |
22 | * Time Graph Presentation Provider Stub.\r | |
23 | */\r | |
3b38ea61 | 24 | @SuppressWarnings("nls")\r |
b83af2c3 | 25 | public class TsfImplProvider extends TimeGraphPresentationProvider {\r |
f6281059 | 26 | \r |
72eda778 ASL |
27 | // ========================================================================\r |
28 | // Methods\r | |
29 | // ========================================================================\r | |
f6281059 | 30 | @Override\r |
549f3c43 | 31 | public int getStateTableIndex(ITimeEvent event) {\r |
b83af2c3 | 32 | return 0;\r |
f6281059 ASL |
33 | }\r |
34 | \r | |
35 | @Override\r | |
36 | public Map<String, String> getEventHoverToolTipInfo(ITimeEvent revent) {\r | |
37 | Map<String, String> toolTipEventMsgs = new HashMap<String, String>();\r | |
38 | if (revent instanceof EventImpl) {\r | |
39 | toolTipEventMsgs.put("Test Tip1", "Test Value tip1");\r | |
40 | toolTipEventMsgs.put("Test Tip2", "Test Value tip2");\r | |
41 | }\r | |
42 | \r | |
43 | return toolTipEventMsgs;\r | |
44 | }\r | |
45 | \r | |
46 | @Override\r | |
b83af2c3 | 47 | public String getEventName(ITimeEvent event) {\r |
f6281059 | 48 | String name = "Unknown";\r |
f6281059 ASL |
49 | if (event instanceof EventImpl) {\r |
50 | EventImpl devent = (EventImpl) event;\r | |
51 | name = devent.getType().toString();\r | |
52 | }\r | |
53 | return name;\r | |
54 | }\r | |
f6281059 | 55 | }\r |