use of org.netxms.ui.eclipse.objectview.objecttabs.helpers.OverviewDciLabelProvider in project netxms by netxms.
the class LastValues method createClientArea.
/* (non-Javadoc)
* @see org.netxms.ui.eclipse.objectview.objecttabs.elements.OverviewPageElement#createClientArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createClientArea(Composite parent) {
viewer = new TableViewer(parent, SWT.FULL_SELECTION | SWT.HIDE_SELECTION | SWT.H_SCROLL | SWT.MULTI);
setupTable();
viewer.setContentProvider(new ArrayContentProvider());
viewer.setLabelProvider(new OverviewDciLabelProvider());
viewer.setComparator(new ViewerComparator() {
@Override
public int compare(Viewer viewer, Object e1, Object e2) {
return ((DciValue) e1).getDescription().compareToIgnoreCase(((DciValue) e2).getDescription());
}
});
viewer.setInput(((DataCollectionTarget) getObject()).getOverviewDciData().toArray());
viewer.getTable().getColumn(0).pack();
viewer.getTable().getColumn(1).pack();
createPopupMenu();
refreshController.setInterval(30);
refresh();
return viewer.getTable();
}
Aggregations