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