package com.quantum.view; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.ITableLabelProvider; import org.eclipse.swt.graphics.Image; import com.quantum.QuantumPlugin; import com.quantum.model.JDBCDriver; /** * @author BC */ public class JDBCDriverLabelProvider implements ITableLabelProvider { public Image getColumnImage(Object element, int columnIndex) { if (columnIndex == 0) { return QuantumPlugin.getImage("driver.gif"); } else { return null; } } public String getColumnText(Object element, int columnIndex) { switch (columnIndex) { case 0: return ((JDBCDriver) element).getName(); case 1: return ((JDBCDriver) element).getClassName(); case 2: return ((JDBCDriver) element).getVersion(); case 3: return ((JDBCDriver) element).getJarFileName(); } return null; } public void addListener(ILabelProviderListener listener) { } public void dispose() { } public boolean isLabelProperty(Object element, String property) { return false; } public void removeListener(ILabelProviderListener listener) { } }