use of org.netxms.ui.eclipse.topology.views.helpers.RadioInterfaceComparator in project netxms by netxms.
the class RadioInterfaces 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().RadioInterfaces_ColApName, Messages.get().RadioInterfaces_ColApMac, Messages.get().RadioInterfaces_ColApVendor, Messages.get().RadioInterfaces_ColApModel, Messages.get().RadioInterfaces_ColApSerial, Messages.get().RadioInterfaces_ColRadioIndex, Messages.get().RadioInterfaces_ColRadioName, Messages.get().RadioInterfaces_ColRadioMac, Messages.get().RadioInterfaces_ColChannel, Messages.get().RadioInterfaces_ColTxPowerDbm, Messages.get().RadioInterfaces_ColTxPowerMw };
final int[] widths = { 120, 100, 140, 140, 100, 90, 120, 100, 90, 90, 90 };
viewer = new SortableTableViewer(parent, names, widths, 1, SWT.UP, SWT.FULL_SELECTION | SWT.MULTI);
viewer.setContentProvider(new ArrayContentProvider());
viewer.setLabelProvider(new RadioInterfaceLabelProvider());
viewer.setComparator(new RadioInterfaceComparator());
// $NON-NLS-1$
WidgetHelper.restoreTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "RadioInterfaces");
viewer.getTable().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
// $NON-NLS-1$
WidgetHelper.saveTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "RadioInterfaces");
}
});
createActions();
contributeToActionBars();
createPopupMenu();
refresh();
}
Aggregations