01: /*******************************************************************************
02: * Copyright (c) 2003, 2006 IBM Corporation and others.
03: * All rights reserved. This program and the accompanying materials
04: * are made available under the terms of the Eclipse Public License v1.0
05: * which accompanies this distribution, and is available at
06: * http://www.eclipse.org/legal/epl-v10.html
07: *
08: * Contributors:
09: * IBM Corporation - initial API and implementation
10: *******************************************************************************/package org.eclipse.ui.internal.progress;
11:
12: import org.eclipse.jface.viewers.LabelProvider;
13: import org.eclipse.swt.graphics.Image;
14:
15: /**
16: * The ProgressLabelProvider is a label provider used for viewers
17: * that need anILabelprovider to show JobInfos.
18: */
19: public class ProgressLabelProvider extends LabelProvider {
20:
21: Image image;
22:
23: /* (non-Javadoc)
24: * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
25: */
26: public Image getImage(Object element) {
27: return ((JobTreeElement) element).getDisplayImage();
28: }
29:
30: /* (non-Javadoc)
31: * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
32: */
33: public String getText(Object element) {
34: return ((JobTreeElement) element).getDisplayString();
35: }
36:
37: }
|