tmf: Move plugins to the Trace Compass namespace
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.ui / src / org / eclipse / linuxtools / internal / tmf / ui / project / wizards / tracepkg / TracePackageLabelProvider.java
1 /*******************************************************************************
2 * Copyright (c) 2013 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 * Marc-Andre Laperle - Initial API and implementation
11 *******************************************************************************/
12
13 package org.eclipse.linuxtools.internal.tmf.ui.project.wizards.tracepkg;
14
15 import org.eclipse.jface.viewers.ColumnLabelProvider;
16 import org.eclipse.jface.viewers.ILabelProviderListener;
17 import org.eclipse.swt.SWT;
18 import org.eclipse.swt.graphics.Color;
19 import org.eclipse.swt.graphics.Image;
20 import org.eclipse.swt.widgets.Display;
21
22 /**
23 * A label provider for the export trace tree.
24 *
25 * @author Marc-Andre Laperle
26 */
27 public class TracePackageLabelProvider extends ColumnLabelProvider {
28
29 @Override
30 public void addListener(ILabelProviderListener listener) {
31 }
32
33 @Override
34 public void dispose() {
35 }
36
37 @Override
38 public boolean isLabelProperty(Object element, String property) {
39 return false;
40 }
41
42 @Override
43 public void removeListener(ILabelProviderListener listener) {
44 }
45
46 @Override
47 public Image getImage(Object element) {
48 return ((TracePackageElement) element).getImage();
49 }
50
51 @Override
52 public String getText(Object element) {
53 return ((TracePackageElement) element).getText();
54 }
55
56 @Override
57 public Color getForeground(Object element) {
58 if (!((TracePackageElement) element).isEnabled()) {
59 return Display.getDefault().getSystemColor(SWT.COLOR_GRAY);
60 }
61 return null;
62 }
63
64 @Override
65 public Color getBackground(Object element) {
66 return null;
67 }
68
69 }
This page took 0.041083 seconds and 5 git commands to generate.