use of org.netxms.ui.eclipse.networkmaps.objecttabs.helpers.ClusterResourceListComparator in project netxms by netxms.
the class ClusterTab method createTabContent.
/* (non-Javadoc)
* @see org.netxms.ui.eclipse.objectview.objecttabs.ObjectTab#createTabContent(org.eclipse.swt.widgets.Composite)
*/
@Override
protected void createTabContent(Composite parent) {
final Composite content = new Composite(parent, SWT.NONE);
GridLayout layout = new GridLayout();
layout.marginWidth = 0;
layout.marginHeight = 0;
content.setLayout(layout);
clusterMap = new NetworkMapWidget(content, null, SWT.NONE);
GridData gd = new GridData();
gd.horizontalAlignment = SWT.FILL;
gd.verticalAlignment = SWT.FILL;
gd.grabExcessHorizontalSpace = true;
gd.grabExcessVerticalSpace = true;
clusterMap.setLayoutData(gd);
clusterMap.setMapLayout(MapLayoutAlgorithm.VTREE);
final String[] names = { Messages.get().ClusterTab_Resource, Messages.get().ClusterTab_VirtualIP, Messages.get().ClusterTab_Owner };
final int[] widths = { 200, 120, 150 };
resourceList = new SortableTableViewer(content, names, widths, COLUMN_NAME, SWT.UP, SortableTableViewer.DEFAULT_STYLE);
resourceList.setContentProvider(new ArrayContentProvider());
resourceList.setLabelProvider(new ClusterResourceListLabelProvider());
resourceList.setComparator(new ClusterResourceListComparator());
gd = new GridData();
gd.horizontalAlignment = SWT.FILL;
gd.verticalAlignment = SWT.FILL;
gd.grabExcessHorizontalSpace = true;
gd.grabExcessVerticalSpace = false;
resourceList.getControl().setLayoutData(gd);
}
Aggregations