Commit | Line | Data |
---|---|---|
79e08fd0 BH |
1 | /******************************************************************************* |
2 | * Copyright (c) 2011 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 | * Mathieu Denis (mathieu.denis@polymtl.ca) - Initial API and Implementation | |
11 | *******************************************************************************/ | |
12 | ||
13 | package org.eclipse.linuxtools.tmf.ui.views.statistics.model; | |
14 | ||
15 | import org.eclipse.jface.viewers.ColumnLabelProvider; | |
16 | import org.eclipse.jface.viewers.ViewerComparator; | |
17 | import org.eclipse.linuxtools.tmf.ui.views.statistics.model.TmfBaseColumnData.ITmfColumnPercentageProvider; | |
18 | ||
19 | /** | |
20 | * Provide the basic interface to create a statistics column | |
21 | */ | |
22 | public interface ITmfStatisticsColumnData { | |
23 | ||
24 | /** | |
25 | * Return the column name. | |
26 | * @return the name of the column. | |
27 | */ | |
28 | public String getHeader(); | |
29 | ||
30 | /** | |
31 | * Return the width of the column at the creation. | |
32 | * @return the width of the column. | |
33 | */ | |
34 | public int getWidth(); | |
35 | ||
36 | /** | |
37 | * Return the alignment of the column. | |
38 | * @see org.eclipse.swt.SWT | |
39 | * @return an integer representing the alignment inside the column. | |
40 | */ | |
41 | public int getAlignment(); | |
42 | ||
43 | /** | |
44 | * Provide the text to show in the tooltip when the cursor comes over the column header. | |
45 | * @return text to show in the tooltip | |
46 | */ | |
47 | public String getTooltip(); | |
48 | ||
49 | /** | |
50 | * Return the labelProvider which provides the information to put in column cells. | |
51 | * @return a ColumnLabelProvider. | |
52 | */ | |
53 | public ColumnLabelProvider getLabelProvider(); | |
54 | ||
55 | /** | |
56 | * Return a ViewerComparator used to sort viewer's contents. | |
57 | * @return the comparator. | |
58 | */ | |
59 | public ViewerComparator getComparator(); | |
60 | ||
61 | /** | |
62 | * Return the provider of the percentage. | |
63 | * Used to draw bar charts in columns. | |
64 | * @return the percentageProvider. | |
65 | */ | |
66 | public ITmfColumnPercentageProvider getPercentageProvider(); | |
67 | } |