//no instances
}
public static TabFolder generateMBeanTabFolder(final Composite parent, final JMXManagedObject mbean, final MBeanServerConnection mbsc)
{
TabFolder tabFolder = new TabFolder(parent, SWT.NONE);
FormData layoutData = new FormData();
layoutData.left = new FormAttachment(0);
layoutData.top = new FormAttachment(0);
layoutData.right = new FormAttachment(100);
layoutData.bottom = new FormAttachment(100);
tabFolder.setLayoutData(layoutData);
TabItem tab;
TabControl controller;
QpidMBeanType mbeanType = QpidMBeanType.get(mbean.getType());
switch(mbeanType)
{
case QUEUE:
createAttributesTab(tabFolder, mbean);
tab = new TabItem(tabFolder, SWT.NONE);
tab.setText("Operations");
controller = new QueueOperationsTabControl(tabFolder, mbean, mbsc);
tab.setControl(controller.getControl());
tab.setData(TabControl.CONTROLLER, controller);
break;
case CONNECTION:
createAttributesTab(tabFolder, mbean);
tab = new TabItem(tabFolder, SWT.NONE);
tab.setText("Operations");
controller = new ConnectionOperationsTabControl(tabFolder, mbean, mbsc);
tab.setControl(controller.getControl());
tab.setData(TabControl.CONTROLLER, controller);
break;
case EXCHANGE:
createAttributesTab(tabFolder, mbean);
if (mbean.getProperty(EXCHANGE_TYPE).equalsIgnoreCase("headers"))
{
tab = new TabItem(tabFolder, SWT.NONE);
tab.setText("Operations");
controller = new HeadersExchangeOperationsTabControl(tabFolder, mbean, mbsc);
tab.setControl(controller.getControl());
tab.setData(TabControl.CONTROLLER, controller);
}
else
{
tab = new TabItem(tabFolder, SWT.NONE);
tab.setText("Operations");
controller = new ExchangeOperationsTabControl(tabFolder, mbean, mbsc);
tab.setControl(controller.getControl());
tab.setData(TabControl.CONTROLLER, controller);
}
break;
case VHOST_MANAGER:
createAttributesTab(tabFolder, mbean);
tab = new TabItem(tabFolder, SWT.NONE);
tab.setText("Operations");
controller = new VHostTabControl(tabFolder, mbean, mbsc);
tab.setControl(controller.getControl());
tab.setData(TabControl.CONTROLLER, controller);
break;
case LOGGING_MANAGEMENT:
tab = new TabItem(tabFolder, SWT.NONE);
tab.setText("Runtime Options");
controller = new RuntimeTabControl(tabFolder, mbean, mbsc);
tab.setControl(controller.getControl());
tab.setData(TabControl.CONTROLLER, controller);
tab = new TabItem(tabFolder, SWT.NONE);
tab.setText("ConfigurationFile Options");
controller = new ConfigurationFileTabControl(tabFolder, mbean, mbsc);
tab.setControl(controller.getControl());
tab.setData(TabControl.CONTROLLER, controller);
break;
case USER_MANAGEMENT:
tab = new TabItem(tabFolder, SWT.NONE);
tab.setText("Operations");
controller = new UserManagementTabControl(tabFolder, mbean, mbsc);
tab.setControl(controller.getControl());
tab.setData(TabControl.CONTROLLER, controller);
break;
case CONFIGURATION_MANAGEMENT:
createGenericTabFolder(tabFolder, mbean);
break;
case UNKNOWN:
createGenericTabFolder(tabFolder, mbean);
break;
}
createNotificationsTabIfNecessary(tabFolder, mbean);
tabFolder.addListener(SWT.Selection, new Listener()
{
public void handleEvent(Event evt)
{
TabItem tab = (TabItem)evt.item;
TabControl controller = (TabControl)tab.getData(TabControl.CONTROLLER);