1 /*******************************************************************************
2 * Copyright (c) 2013 Ericsson
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
10 * Marc-Andre Laperle - Initial API and implementation
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.tmf
.ui
.project
.wizards
.tracepkg
;
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
;
23 * A label provider for the export trace tree.
25 * @author Marc-Andre Laperle
27 public class TracePackageLabelProvider
extends ColumnLabelProvider
{
30 public void addListener(ILabelProviderListener listener
) {
34 public void dispose() {
38 public boolean isLabelProperty(Object element
, String property
) {
43 public void removeListener(ILabelProviderListener listener
) {
47 public Image
getImage(Object element
) {
48 return ((TracePackageElement
) element
).getImage();
52 public String
getText(Object element
) {
53 return ((TracePackageElement
) element
).getText();
57 public Color
getForeground(Object element
) {
58 if (!((TracePackageElement
) element
).isEnabled()) {
59 return Display
.getDefault().getSystemColor(SWT
.COLOR_GRAY
);
65 public Color
getBackground(Object element
) {