* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
- *
+ �*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.swt.graphics.Image;
+
/**
* Web browser table label provider.
*/
/**
*
*/
- public void addListener(ILabelProviderListener listener) { }
+ public void addListener(ILabelProviderListener listener) {
+ }
/**
*
*/
- public void dispose() { }
+ public void dispose() {
+ }
/**
*
public Image getColumnImage(Object element, int columnIndex) {
if (columnIndex == 0) {
if (element instanceof IInternalWebBrowser)
- return ImageResource.getImage(ImageResource.IMG_INTERNAL_BROWSER);
+ return ImageResource
+ .getImage(ImageResource.IMG_INTERNAL_BROWSER);
else
- return ImageResource.getImage(ImageResource.IMG_EXTERNAL_BROWSER);
+ return ImageResource
+ .getImage(ImageResource.IMG_EXTERNAL_BROWSER);
}
return null;
}
/**
* Returns the label text for the given column of the given element.
- *
- * @param element the object representing the entire row, or
- * <code>null</code> indicating that no input object is set
- * in the viewer
- * @param columnIndex the zero-based index of the column in which the label appears
+ *
+ * @param element
+ * the object representing the entire row, or <code>null</code>
+ * indicating that no input object is set in the viewer
+ * @param columnIndex
+ * the zero-based index of the column in which the label appears
*/
public String getColumnText(Object element, int columnIndex) {
- IWebBrowser browser = (IWebBrowser)element;
+ IWebBrowser browser = (IWebBrowser) element;
if (browser instanceof IExternalWebBrowser) {
if (columnIndex == 0)
- return notNull(((IExternalWebBrowser)browser).getName());
+ return notNull(((IExternalWebBrowser) browser).getName());
else if (columnIndex == 1)
- return notNull(((IExternalWebBrowser)browser).getLocation());
+ return notNull(((IExternalWebBrowser) browser).getLocation());
else if (columnIndex == 2)
- return notNull(((IExternalWebBrowser)browser).getParameters());
- } else if(browser instanceof IInternalWebBrowser) {
+ return notNull(((IExternalWebBrowser) browser).getParameters());
+ } else if (browser instanceof IInternalWebBrowser) {
if (columnIndex == 0)
- return notNull(((IInternalWebBrowser)browser).getName());
+ return notNull(((IInternalWebBrowser) browser).getName());
}
return "";
}
-
+
protected String notNull(String s) {
if (s != null)
return s;
/**
*
*/
- public void removeListener(ILabelProviderListener listener) { }
+ public void removeListener(ILabelProviderListener listener) {
+ }
}
\ No newline at end of file