use of org.eclipse.jface.viewers.ViewerColumn in project org.eclipse.rap by eclipse-rap.
the class RowTemplateExample method addMailColumn.
private void addMailColumn(ColumnViewer viewer) {
ViewerColumn pohoneColumn = createViewerColumn(viewer, "E-Mail", 180);
pohoneColumn.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(Object element) {
Person p = (Person) element;
return p.getMail();
}
});
}
use of org.eclipse.jface.viewers.ViewerColumn in project org.eclipse.rap by eclipse-rap.
the class RowTemplateExample method addFirstNameColumn.
private void addFirstNameColumn(final ColumnViewer viewer) {
ViewerColumn firstNameColumn = createViewerColumn(viewer, "First Name", 200);
firstNameColumn.setLabelProvider(new ColumnLabelProvider() {
@Override
public String getText(Object element) {
Person p = (Person) element;
return p.getFirstName();
}
@Override
public Image getImage(Object element) {
Person p = (Person) element;
return p.getImage();
}
});
}
use of org.eclipse.jface.viewers.ViewerColumn in project org.eclipse.rap by eclipse-rap.
the class TableViewerTest method getViewerColumn.
ViewerColumn getViewerColumn(ColumnViewer viewer, int index) {
Method method;
try {
method = ColumnViewer.class.getDeclaredMethod("getViewerColumn", new Class[] { int.class });
method.setAccessible(true);
return (ViewerColumn) method.invoke(viewer, new Object[] { new Integer(index) });
} catch (Exception e) {
throw new RuntimeException(e);
}
}
Aggregations