Search in sources :

Example 1 with WirelessStationComparator

use of org.netxms.ui.eclipse.topology.views.helpers.WirelessStationComparator in project netxms by netxms.

the class WirelessStations 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().WirelessStations_ColMacAddr, Messages.get().WirelessStations_ColIpAddr, Messages.get().WirelessStations_ColNode, Messages.get().WirelessStations_ColAp, Messages.get().WirelessStations_ColRadio, Messages.get().WirelessStations_ColSSID };
    final int[] widths = { 120, 90, 180, 180, 100, 100 };
    viewer = new SortableTableViewer(parent, names, widths, 1, SWT.UP, SWT.FULL_SELECTION | SWT.MULTI);
    viewer.setContentProvider(new ArrayContentProvider());
    viewer.setLabelProvider(new WirelessStationLabelProvider());
    viewer.setComparator(new WirelessStationComparator());
    // $NON-NLS-1$
    WidgetHelper.restoreTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "WirelessStations");
    viewer.getTable().addDisposeListener(new DisposeListener() {

        @Override
        public void widgetDisposed(DisposeEvent e) {
            // $NON-NLS-1$
            WidgetHelper.saveTableViewerSettings(viewer, Activator.getDefault().getDialogSettings(), "WirelessStations");
        }
    });
    createActions();
    contributeToActionBars();
    createPopupMenu();
    refresh();
}
Also used : DisposeListener(org.eclipse.swt.events.DisposeListener) WirelessStationLabelProvider(org.netxms.ui.eclipse.topology.views.helpers.WirelessStationLabelProvider) WirelessStationComparator(org.netxms.ui.eclipse.topology.views.helpers.WirelessStationComparator) ArrayContentProvider(org.eclipse.jface.viewers.ArrayContentProvider) SortableTableViewer(org.netxms.ui.eclipse.widgets.SortableTableViewer) DisposeEvent(org.eclipse.swt.events.DisposeEvent)

Aggregations

ArrayContentProvider (org.eclipse.jface.viewers.ArrayContentProvider)1 DisposeEvent (org.eclipse.swt.events.DisposeEvent)1 DisposeListener (org.eclipse.swt.events.DisposeListener)1 WirelessStationComparator (org.netxms.ui.eclipse.topology.views.helpers.WirelessStationComparator)1 WirelessStationLabelProvider (org.netxms.ui.eclipse.topology.views.helpers.WirelessStationLabelProvider)1 SortableTableViewer (org.netxms.ui.eclipse.widgets.SortableTableViewer)1