KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > ui > internal > net > NonProxyHostsLabelProvider


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 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  * yyyymmdd bug Email and other contact information
11  * -------- -------- -----------------------------------------------------------
12  * 20070201 154100 pmoogk@ca.ibm.com - Peter Moogk, Port internet code from WTP to Eclipse base.
13  *******************************************************************************/

14
15 package org.eclipse.ui.internal.net;
16
17 import org.eclipse.jface.viewers.ILabelProviderListener;
18
19 import org.eclipse.swt.graphics.Image;
20 import org.eclipse.jface.viewers.ITableLabelProvider;
21
22 /**
23  * Monitor table label provider.
24  */

25 public class NonProxyHostsLabelProvider implements ITableLabelProvider
26 {
27     /**
28      * MonitorTableLabelProvider constructor comment.
29      */

30     public NonProxyHostsLabelProvider()
31     {
32         super();
33     }
34
35     /**
36      * Adds a listener to this label provider.
37      * Has no effect if an identical listener is already registered.
38      * <p>
39      * Label provider listeners are informed about state changes
40      * that affect the rendering of the viewer that uses this label provider.
41      * </p>
42      *
43      * @param listener a label provider listener
44      */

45     public void addListener(ILabelProviderListener listener)
46     {
47         // do nothing
48
}
49
50     /**
51      * Disposes of this label provider. When a label provider is
52      * attached to a viewer, the viewer will automatically call
53      * this method when the viewer is being closed. When label providers
54      * are used outside of the context of a viewer, it is the client's
55      * responsibility to ensure that this method is called when the
56      * provider is no longer needed.
57      */

58     public void dispose()
59     {
60         // do nothing
61
}
62
63     /**
64      * Returns the label image for the given column of the given element.
65      *
66      * @param element the object representing the entire row, or
67      * <code>null</code> indicating that no input object is set
68      * in the viewer
69      * @param columnIndex the zero-based index of the column in which
70      * the label appears
71      */

72     public Image getColumnImage(Object JavaDoc element, int columnIndex)
73     {
74         return null;
75     }
76
77     /**
78      * Returns the label text for the given column of the given element.
79      *
80      * @param element the object representing the entire row, or
81      * <code>null</code> indicating that no input object is set
82      * in the viewer
83      * @param columnIndex the zero-based index of the column in which the label appears
84      */

85     public String JavaDoc getColumnText(Object JavaDoc element, int columnIndex)
86     {
87         return (String JavaDoc)element;
88     }
89     
90     /**
91      * Returns whether the label would be affected
92      * by a change to the given property of the given element.
93      * This can be used to optimize a non-structural viewer update.
94      * If the property mentioned in the update does not affect the label,
95      * then the viewer need not update the label.
96      *
97      * @param element the element
98      * @param property the property
99      * @return <code>true</code> if the label would be affected,
100      * and <code>false</code> if it would be unaffected
101      */

102     public boolean isLabelProperty(Object JavaDoc element, String JavaDoc property)
103     {
104         return false;
105     }
106
107     /**
108      * Removes a listener to this label provider.
109      * Has no affect if an identical listener is not registered.
110      *
111      * @param listener a label provider listener
112      */

113     public void removeListener(ILabelProviderListener listener)
114     {
115         // do nothing
116
}
117 }
118
Popular Tags