KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > help > ui > internal > search > HelpWorkingSetElementLabelProvider


1 /*******************************************************************************
2  * Copyright (c) 2000, 2005 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.help.ui.internal.search;
12
13 import org.eclipse.help.internal.workingset.*;
14 import org.eclipse.jface.viewers.*;
15 import org.eclipse.swt.graphics.*;
16
17 public class HelpWorkingSetElementLabelProvider extends LabelProvider {
18
19     /**
20      * Constructor for HelpWorkingSetElementLabelProvider.
21      */

22     public HelpWorkingSetElementLabelProvider() {
23         super();
24     }
25
26     /**
27      * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
28      */

29     public Image getImage(Object JavaDoc element) {
30         return null;
31     }
32
33     /**
34      * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
35      */

36     public String JavaDoc getText(Object JavaDoc element) {
37         if (element instanceof AdaptableToc)
38             return ((AdaptableToc) element).getLabel();
39         else if (element instanceof AdaptableTopic)
40             return ((AdaptableTopic) element).getLabel();
41         else
42             return null;
43     }
44
45 }
46
Popular Tags