Bug 378401: Implementation of time graph widget.
[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 public abstract class TimeGraphPresentationProvider implements ITimeGraphPresentationProvider {
26
27 // ------------------------------------------------------------------------
28 // Constants
29 // ------------------------------------------------------------------------
30 private static final int DEFAULT_ITEM_HEIGHT = 19;
31
32 // ------------------------------------------------------------------------
33 // Operations
34 // ------------------------------------------------------------------------
35
36 /*
37 * (non-Javadoc)
38 * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getStateTypeName()
39 */
40 @Override
41 public String getStateTypeName() {
42 return Messages.TmfTimeLegend_TRACE_STATES;
43 }
44
45 /*
46 * (non-Javadoc)
47 * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#postDrawControl(org.eclipse.swt.graphics.Rectangle, org.eclipse.swt.graphics.GC)
48 */
49 @Override
50 public void postDrawControl(Rectangle bounds, GC gc) {
51 // Override to add own drawing code
52 }
53
54 /*
55 * (non-Javadoc)
56 * @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)
57 */
58 @Override
59 public void postDrawEntry(ITimeGraphEntry entry, Rectangle bounds, GC gc) {
60 // Override to add own drawing code
61 }
62
63 /*
64 * (non-Javadoc)
65 * @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)
66 */
67 @Override
68 public void postDrawEvent(ITimeEvent event, Rectangle bounds, GC gc) {
69 // Override to add own drawing code
70 }
71
72 /*
73 * (non-Javadoc)
74 * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getStateTable()
75 */
76 @Override
77 public StateItem[] getStateTable() {
78 return null;
79 }
80
81 /*
82 * (non-Javadoc)
83 * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventTableIndex(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent)
84 */
85 @Override
86 public int getStateTableIndex(ITimeEvent event) {
87 return 0;
88 }
89
90 /*
91 * (non-Javadoc)
92 * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getItemHeight(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry)
93 */
94 @Override
95 public int getItemHeight(ITimeGraphEntry entry) {
96 return DEFAULT_ITEM_HEIGHT;
97 }
98
99 /*
100 * (non-Javadoc)
101 * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getItemImage(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeGraphEntry)
102 */
103 @Override
104 public Image getItemImage(ITimeGraphEntry entry) {
105 return null;
106 }
107
108 /*
109 * (non-Javadoc)
110 * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventName(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent)
111 */
112 @Override
113 public String getEventName(ITimeEvent event) {
114 return null;
115 }
116
117 /*
118 * (non-Javadoc)
119 * @see org.eclipse.linuxtools.tmf.ui.widgets.timegraph.ITimeGraphPresentationProvider#getEventHoverToolTipInfo(org.eclipse.linuxtools.tmf.ui.widgets.timegraph.model.ITimeEvent)
120 */
121 @Override
122 public Map<String, String> getEventHoverToolTipInfo(ITimeEvent event) {
123 return null;
124 }
125
126 }
This page took 0.033561 seconds and 6 git commands to generate.