View Javadoc

1   /*
2    *  File: DefaultLabelProvider.java 
3    *  Copyright (c) 2004-2007  Peter Kliem (Peter.Kliem@jaret.de)
4    *  A commercial license is available, see http://www.jaret.de.
5    *
6    * All rights reserved. This program and the accompanying materials
7    * are made available under the terms of the Common Public License v1.0
8    * which accompanies this distribution, and is available at
9    * http://www.eclipse.org/legal/cpl-v10.html
10   */
11  package de.jaret.util.ui;
12  
13  import org.eclipse.jface.viewers.ILabelProvider;
14  import org.eclipse.jface.viewers.ILabelProviderListener;
15  import org.eclipse.swt.graphics.Image;
16  
17  /**
18   * Simple "toString"-LabelProvider.
19   * 
20   * @author Peter Kliem
21   * @version $Id: DefaultLabelProvider.java 242 2007-02-11 21:05:07Z olk $
22   */
23  public class DefaultLabelProvider implements ILabelProvider {
24  
25      /*
26       * (non-Javadoc)
27       * 
28       * @see org.eclipse.jface.viewers.ILabelProvider#getImage(java.lang.Object)
29       */
30      public Image getImage(Object arg0) {
31          return null;
32      }
33  
34      /*
35       * (non-Javadoc)
36       * 
37       * @see org.eclipse.jface.viewers.ILabelProvider#getText(java.lang.Object)
38       */
39      public String getText(Object o) {
40          return o.toString();
41      }
42  
43      /*
44       * (non-Javadoc)
45       * 
46       * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener)
47       */
48      public void addListener(ILabelProviderListener arg0) {
49      }
50  
51      /*
52       * (non-Javadoc)
53       * 
54       * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose()
55       */
56      public void dispose() {
57      }
58  
59      /*
60       * (non-Javadoc)
61       * 
62       * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String)
63       */
64      public boolean isLabelProperty(Object arg0, String arg1) {
65          return false;
66      }
67  
68      /*
69       * (non-Javadoc)
70       * 
71       * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener)
72       */
73      public void removeListener(ILabelProviderListener arg0) {
74      }
75  
76  }