Commit | Line | Data |
---|---|---|
b83af2c3 PT |
1 | /*******************************************************************************\r |
2 | * Copyright (c) 2009, 2010, 2012 Ericsson\r | |
013a5f1c | 3 | *\r |
b83af2c3 PT |
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 | |
013a5f1c | 8 | *\r |
b83af2c3 PT |
9 | * Contributors:\r |
10 | * Alvaro Sanchez-Leon - Initial API and implementation\r | |
11 | * Patrick Tasse - Refactoring\r | |
12 | *******************************************************************************/\r | |
13 | \r | |
14 | package org.eclipse.linuxtools.tmf.ui.widgets.timegraph;\r | |
15 | \r | |
16 | import java.util.Map;\r | |
17 | \r | |
18 | import org.eclipse.linuxtools.internal.tmf.ui.Messages;\r | |
19 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent;\r | |
20 | import org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry;\r | |
21 | import org.eclipse.swt.graphics.GC;\r | |
22 | import org.eclipse.swt.graphics.Image;\r | |
23 | import org.eclipse.swt.graphics.Rectangle;\r | |
24 | \r | |
013a5f1c AM |
25 | /**\r |
26 | * Provider class for the time graph provider\r | |
27 | *\r | |
28 | * @version 1.0\r | |
29 | * @author Patrick Tasse\r | |
30 | *\r | |
31 | */\r | |
7600ba7d | 32 | public class TimeGraphPresentationProvider implements ITimeGraphPresentationProvider {\r |
b83af2c3 PT |
33 | \r |
34 | // ------------------------------------------------------------------------\r | |
35 | // Constants\r | |
36 | // ------------------------------------------------------------------------\r | |
37 | private static final int DEFAULT_ITEM_HEIGHT = 19;\r | |
38 | \r | |
39 | // ------------------------------------------------------------------------\r | |
40 | // Operations\r | |
41 | // ------------------------------------------------------------------------\r | |
549f3c43 | 42 | \r |
b83af2c3 PT |
43 | /*\r |
44 | * (non-Javadoc)\r | |
45 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getStateTypeName()\r | |
46 | */\r | |
47 | @Override\r | |
48 | public String getStateTypeName() {\r | |
49 | return Messages.TmfTimeLegend_TRACE_STATES;\r | |
50 | }\r | |
51 | \r | |
9cd23350 BH |
52 | /**\r |
53 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getStateTypeName(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry)\r | |
54 | * @since 2.0\r | |
55 | */\r | |
56 | @Override\r | |
57 | public String getStateTypeName(ITimeGraphEntry entry) {\r | |
58 | return null;\r | |
59 | }\r | |
b83af2c3 PT |
60 | /*\r |
61 | * (non-Javadoc)\r | |
7600ba7d | 62 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getStateTable()\r |
b83af2c3 PT |
63 | */\r |
64 | @Override\r | |
7600ba7d PT |
65 | public StateItem[] getStateTable() {\r |
66 | return null;\r | |
b83af2c3 PT |
67 | }\r |
68 | \r | |
69 | /*\r | |
70 | * (non-Javadoc)\r | |
7600ba7d | 71 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventTableIndex(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent)\r |
b83af2c3 PT |
72 | */\r |
73 | @Override\r | |
7600ba7d PT |
74 | public int getStateTableIndex(ITimeEvent event) {\r |
75 | return 0;\r | |
b83af2c3 PT |
76 | }\r |
77 | \r | |
78 | /*\r | |
79 | * (non-Javadoc)\r | |
7600ba7d | 80 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#postDrawControl(org.eclipse.swt.graphics.Rectangle, org.eclipse.swt.graphics.GC)\r |
b83af2c3 PT |
81 | */\r |
82 | @Override\r | |
7600ba7d | 83 | public void postDrawControl(Rectangle bounds, GC gc) {\r |
b83af2c3 PT |
84 | // Override to add own drawing code\r |
85 | }\r | |
86 | \r | |
b83af2c3 PT |
87 | /*\r |
88 | * (non-Javadoc)\r | |
7600ba7d | 89 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#postDrawEntry(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry, org.eclipse.swt.graphics.Rectangle, org.eclipse.swt.graphics.GC)\r |
b83af2c3 PT |
90 | */\r |
91 | @Override\r | |
7600ba7d PT |
92 | public void postDrawEntry(ITimeGraphEntry entry, Rectangle bounds, GC gc) {\r |
93 | // Override to add own drawing code\r | |
b83af2c3 | 94 | }\r |
7600ba7d | 95 | \r |
b83af2c3 PT |
96 | /*\r |
97 | * (non-Javadoc)\r | |
7600ba7d | 98 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#postDrawEvent(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent, org.eclipse.swt.graphics.Rectangle, org.eclipse.swt.graphics.GC)\r |
b83af2c3 PT |
99 | */\r |
100 | @Override\r | |
7600ba7d PT |
101 | public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {\r |
102 | // Override to add own drawing code\r | |
b83af2c3 PT |
103 | }\r |
104 | \r | |
105 | /*\r | |
106 | * (non-Javadoc)\r | |
107 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getItemHeight(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry)\r | |
108 | */\r | |
109 | @Override\r | |
110 | public int getItemHeight(ITimeGraphEntry entry) {\r | |
111 | return DEFAULT_ITEM_HEIGHT;\r | |
112 | }\r | |
113 | \r | |
114 | /*\r | |
115 | * (non-Javadoc)\r | |
549f3c43 | 116 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getItemImage(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry)\r |
b83af2c3 PT |
117 | */\r |
118 | @Override\r | |
549f3c43 | 119 | public Image getItemImage(ITimeGraphEntry entry) {\r |
b83af2c3 PT |
120 | return null;\r |
121 | }\r | |
122 | \r | |
b83af2c3 PT |
123 | /*\r |
124 | * (non-Javadoc)\r | |
549f3c43 | 125 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventName(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent)\r |
b83af2c3 PT |
126 | */\r |
127 | @Override\r | |
549f3c43 PT |
128 | public String getEventName(ITimeEvent event) {\r |
129 | return null;\r | |
b83af2c3 PT |
130 | }\r |
131 | \r | |
549f3c43 PT |
132 | /*\r |
133 | * (non-Javadoc)\r | |
134 | * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventHoverToolTipInfo(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent)\r | |
b83af2c3 PT |
135 | */\r |
136 | @Override\r | |
549f3c43 | 137 | public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) {\r |
b83af2c3 PT |
138 | return null;\r |
139 | }\r | |
140 | \r | |
141 | } |