use of org.netxms.ui.eclipse.objectview.widgets.helpers.SoftwarePackageComparator in project netxms by netxms.
the class SoftwareInventory method createTableViewer.
/**
* Create viewer for table mode
*/
private void createTableViewer() {
viewer = new SortableTableViewer(this, names, widths, 0, SWT.UP, SWT.MULTI | SWT.FULL_SELECTION);
WidgetHelper.restoreColumnViewerSettings(viewer, Activator.getDefault().getDialogSettings(), configPrefix);
viewer.getControl().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
WidgetHelper.saveColumnViewerSettings(viewer, Activator.getDefault().getDialogSettings(), configPrefix);
}
});
viewer.setContentProvider(new ArrayContentProvider());
viewer.setLabelProvider(new SoftwarePackageLabelProvider(false));
viewer.setComparator(new SoftwarePackageComparator());
if (menuManager != null) {
Menu menu = menuManager.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
viewPart.getSite().registerContextMenu(menuManager, viewer);
}
}
use of org.netxms.ui.eclipse.objectview.widgets.helpers.SoftwarePackageComparator in project netxms by netxms.
the class SoftwareInventory method createTreeViewer.
/**
* Create viewer for tree mode
*/
private void createTreeViewer() {
viewer = new SortableTreeViewer(this, names, widths, 0, SWT.UP, SWT.MULTI | SWT.FULL_SELECTION);
WidgetHelper.restoreColumnViewerSettings(viewer, Activator.getDefault().getDialogSettings(), configPrefix);
viewer.getControl().addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
WidgetHelper.saveColumnViewerSettings(viewer, Activator.getDefault().getDialogSettings(), configPrefix);
}
});
viewer.setContentProvider(new SoftwareInventoryContentProvider());
viewer.setLabelProvider(new SoftwarePackageLabelProvider(true));
viewer.setComparator(new SoftwarePackageComparator());
if (menuManager != null) {
Menu menu = menuManager.createContextMenu(viewer.getControl());
viewer.getControl().setMenu(menu);
viewPart.getSite().registerContextMenu(menuManager, viewer);
}
}
Aggregations