use of org.netxms.ui.eclipse.objectview.objecttabs.helpers.NodeListLabelProvider in project netxms by netxms.
the class NodesTab method createTabContent.
/* (non-Javadoc)
* @see org.netxms.ui.eclipse.objectview.objecttabs.ObjectTab#createTabContent(org.eclipse.swt.widgets.Composite)
*/
@Override
protected void createTabContent(Composite parent) {
final String[] names = { Messages.get().NodesTab_ColId, Messages.get().NodesTab_ColName, Messages.get().NodesTab_ColPrimaryIP, Messages.get().NodesTab_ColRack, Messages.get().NodesTab_ColPlatform, Messages.get().NodesTab_ColAgentVersion, Messages.get().NodesTab_ColSysDescr, Messages.get().NodesTab_ColStatus };
final int[] widths = { 60, 150, 100, 150, 150, 100, 300, 100 };
viewer = new SortableTableViewer(parent, names, widths, COLUMN_NAME, SWT.UP, SWT.FULL_SELECTION | SWT.MULTI);
viewer.setLabelProvider(new NodeListLabelProvider());
viewer.setContentProvider(new ArrayContentProvider());
viewer.setComparator(new NodeListComparator());
viewer.getTable().setHeaderVisible(true);
viewer.getTable().setLinesVisible(true);
// $NON-NLS-1$
WidgetHelper.restoreTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "NodeTable.V2");
viewer.getTable().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
// $NON-NLS-1$
WidgetHelper.saveColumnSettings(viewer.getTable(), Activator.getDefault().getDialogSettings(), "NodeTable.V2");
}
});
createActions();
createPopupMenu();
}
Aggregations