Commit | Line | Data |
---|---|---|
be222f56 | 1 | /******************************************************************************* |
c8422608 | 2 | * Copyright (c) 2009, 2012 Ericsson |
be222f56 PT |
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.timegraph.test.stub.adaption; | |
13 | ||
14 | import java.util.HashMap; | |
15 | import java.util.Map; | |
16 | ||
17 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.TimeGraphPresentationProvider; | |
18 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent; | |
19 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.test.stub.model.EventImpl; | |
20 | ||
21 | /** | |
22 | * Time Graph Presentation Provider Stub. | |
23 | */ | |
24 | @SuppressWarnings("nls") | |
25 | public class TsfImplProvider extends TimeGraphPresentationProvider { | |
26 | ||
27 | // ======================================================================== | |
28 | // Methods | |
29 | // ======================================================================== | |
30 | @Override | |
31 | public int getStateTableIndex(ITimeEvent event) { | |
32 | return 0; | |
33 | } | |
34 | ||
35 | @Override | |
36 | public Map<String, String> getEventHoverToolTipInfo(ITimeEvent revent) { | |
37 | Map<String, String> toolTipEventMsgs = new HashMap<String, String>(); | |
38 | if (revent instanceof EventImpl) { | |
39 | toolTipEventMsgs.put("Test Tip1", "Test Value tip1"); | |
40 | toolTipEventMsgs.put("Test Tip2", "Test Value tip2"); | |
41 | } | |
42 | ||
43 | return toolTipEventMsgs; | |
44 | } | |
45 | ||
46 | @Override | |
47 | public String getEventName(ITimeEvent event) { | |
48 | String name = "Unknown"; | |
49 | if (event instanceof EventImpl) { | |
50 | EventImpl devent = (EventImpl) event; | |
51 | name = devent.getType().toString(); | |
52 | } | |
53 | return name; | |
54 | } | |
55 | } |