{
headerBindingHashMap = new HashMap<Text, Text>();
_paramsComposite.setLayout(new GridLayout());
_paramsComposite.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, true));
final ScrolledComposite scrolledComposite = new ScrolledComposite(_paramsComposite, SWT.BORDER | SWT.V_SCROLL);
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
GridData layoutData = new GridData(SWT.FILL, SWT.TOP, true, true);
scrolledComposite.setLayoutData(layoutData);
scrolledComposite.setLayout(new GridLayout());
final Composite composite = _toolkit.createComposite(scrolledComposite, SWT.NONE);
scrolledComposite.setContent(composite);
layoutData = new GridData(SWT.FILL, SWT.FILL, true, true);
layoutData.verticalIndent = 20;
composite.setLayoutData(layoutData);
composite.setLayout(new FormLayout());
List<ParameterData> params = _opData.getParameters();
ParameterData param = params.get(0);
// Queue selection widget
Label label = _toolkit.createLabel(composite, ViewUtility.getDisplayText(param.getName()));
FormData formData = new FormData();
formData.top = new FormAttachment(0, 2);
formData.right = new FormAttachment(labelWidth);
label.setLayoutData(formData);
label.setToolTipText(param.getDescription());
formData = new FormData();
formData.top = new FormAttachment(0);
formData.left = new FormAttachment(label, 5);
formData.right = new FormAttachment(valueWidth);
Combo combo = new Combo(composite, SWT.READ_ONLY | SWT.DROP_DOWN);
List<String> qList = ApplicationRegistry.getServerRegistry(_mbean).getQueueNames(_virtualHostName);
combo.setItems(qList.toArray(new String[0]));
combo.add("Select Queue", 0);
combo.select(0);
combo.setLayoutData(formData);
combo.setData(param);
combo.addSelectionListener(parameterSelectionListener);
// Binding creation widgets
createARowForCreatingHeadersBinding(composite, 1);
createARowForCreatingHeadersBinding(composite, 2);
createARowForCreatingHeadersBinding(composite, 3);
createARowForCreatingHeadersBinding(composite, 4);
createARowForCreatingHeadersBinding(composite, 5);
createARowForCreatingHeadersBinding(composite, 6);
createARowForCreatingHeadersBinding(composite, 7);
createARowForCreatingHeadersBinding(composite, 8);
final Button addMoreButton = _toolkit.createButton(composite, "Add More", SWT.PUSH);
formData = new FormData();
formData.top = new FormAttachment(0, heightForAParameter);
formData.left = new FormAttachment(70, 5);
addMoreButton.setLayoutData(formData);
addMoreButton.setData("rowCount", 8);
addMoreButton.addSelectionListener(new SelectionAdapter()
{
public void widgetSelected(SelectionEvent e)
{
int count = Integer.parseInt(addMoreButton.getData("rowCount").toString());
createARowForCreatingHeadersBinding(composite, ++count);
addMoreButton.setData("rowCount", count);
scrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
composite.layout();
_form.layout();
}
});
scrolledComposite.setMinSize(composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
composite.layout();
}