import java.util.Iterator;
import java.util.List;
+import com.quantum.model.Displayable;
+
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.viewers.ILabelProviderListener;
}
public String getColumnText(Object element, int columnIndex) {
- return element.toString();
+ if (element instanceof Displayable) {
+ return ((Displayable) element).getDisplayName();
+ } else {
+ return element.toString();
+ }
}
public void addListener(ILabelProviderListener listener) {
style |= SWT.MULTI;
}
this.viewer = new TableViewer(composite, style);
- GridData full = new GridData(GridData.FILL_HORIZONTAL);
- full.widthHint = 200;
- full.heightHint = 50;
+ GridData full = new GridData(GridData.FILL_BOTH);
+ full.widthHint = 300;
+ full.heightHint = 100;
this.viewer.getControl().setLayoutData(full);
this.viewer.setLabelProvider(new LabelProvider());