use of org.netxms.ui.eclipse.switchmanager.views.helpers.Dot1xPortListLabelProvider in project netxms by netxms.
the class Dot1xStatusView method createPartControl.
/* (non-Javadoc)
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createPartControl(Composite parent) {
final String[] names = { Messages.get().Dot1xStatusView_ColDevice, Messages.get().Dot1xStatusView_ColSlotPort, Messages.get().Dot1xStatusView_ColInterface, Messages.get().Dot1xStatusView_ColPAE, Messages.get().Dot1xStatusView_ColBackend };
final int[] widths = { 250, 60, 180, 150, 150 };
viewer = new SortableTableViewer(parent, names, widths, 1, SWT.UP, SWT.FULL_SELECTION | SWT.MULTI);
viewer.setContentProvider(new ArrayContentProvider());
viewer.setLabelProvider(new Dot1xPortListLabelProvider());
viewer.setComparator(new Dot1xPortComparator());
// $NON-NLS-1$
WidgetHelper.restoreTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "Dot1xStatusView");
viewer.getTable().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
// $NON-NLS-1$
WidgetHelper.saveTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "Dot1xStatusView");
}
});
createActions();
contributeToActionBars();
createPopupMenu();
refresh();
}
Aggregations