use of org.netxms.ui.eclipse.topology.views.helpers.RoutingTableComparator in project netxms by netxms.
the class RoutingTableView 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().RoutingTableView_Destination, Messages.get().RoutingTableView_NextHop, Messages.get().RoutingTableView_Interface, Messages.get().RoutingTableView_Type };
final int[] widths = { 180, 140, 200, 140 };
viewer = new SortableTableViewer(parent, names, widths, COLUMN_DESTINATION, SWT.DOWN, SWT.FULL_SELECTION | SWT.MULTI);
viewer.setContentProvider(new ArrayContentProvider());
viewer.setLabelProvider(new RoutingTableLabelProvider());
viewer.setComparator(new RoutingTableComparator());
// $NON-NLS-1$
WidgetHelper.restoreTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "RoutingTable");
viewer.getTable().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
// $NON-NLS-1$
WidgetHelper.saveTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "RoutingTable");
}
});
createActions();
contributeToActionBars();
createPopupMenu();
refresh();
}
Aggregations