KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > navigator > workingsets > WorkingSetsLabelProvider


1 /*******************************************************************************
2  * Copyright (c) 2005, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.ui.internal.navigator.workingsets;
12
13 import org.eclipse.jface.viewers.ILabelProvider;
14 import org.eclipse.jface.viewers.ILabelProviderListener;
15 import org.eclipse.swt.graphics.Image;
16 import org.eclipse.ui.IWorkingSet;
17 import org.eclipse.ui.model.WorkbenchLabelProvider;
18
19 /**
20  * Provides a text label and icon for Working Sets.
21  *
22  */

23 public class WorkingSetsLabelProvider implements ILabelProvider {
24
25     private WorkbenchLabelProvider labelProvider = new WorkbenchLabelProvider();
26
27     public Image getImage(Object JavaDoc element) {
28         if (element instanceof IWorkingSet)
29             return labelProvider.getImage(element);
30         return null;
31     }
32
33     public String JavaDoc getText(Object JavaDoc element) {
34         if (element instanceof IWorkingSet)
35             return ((IWorkingSet) element).getLabel();
36         return null;
37     }
38
39     public void addListener(ILabelProviderListener listener) {
40         // TODO Auto-generated method stub
41

42     }
43
44     public void dispose() {
45         // TODO Auto-generated method stub
46

47     }
48
49     public boolean isLabelProperty(Object JavaDoc element, String JavaDoc property) {
50         // TODO Auto-generated method stub
51
return false;
52     }
53
54     public void removeListener(ILabelProviderListener listener) {
55         // TODO Auto-generated method stub
56

57     }
58
59 }
60
Popular Tags