return dispatchPanel;
}
private Component buildToolbar()
{
JXToolBar toolbar = UISupport.createToolbar();
toolbar.addSpace( 3 );
toolbar.addFixed( UISupport.createToolbarButton( SwingActionDelegate.createDelegate(
NewMockResponseAction.SOAPUI_ACTION_ID, getModelItem(), null, "/addToMockService.gif" ) ) );
toolbar.addFixed( UISupport.createToolbarButton( SwingActionDelegate.createDelegate(
OpenRequestForMockOperationAction.SOAPUI_ACTION_ID, getModelItem(), null, "/open_request.gif" ) ) );
toolbar.addUnrelatedGap();
ModelItemNames<WsdlInterface> names = new ModelItemNames<WsdlInterface>( ModelSupport.getChildren( getModelItem()
.getMockService().getProject(), WsdlInterface.class ) );
interfaceCombo = new JComboBox( names.getNames() );
interfaceCombo.setSelectedIndex( -1 );
interfaceCombo.addItemListener( new InterfaceComboListener() );
toolbar.addLabeledFixed( "Interface", interfaceCombo );
toolbar.addUnrelatedGap();
operationCombo = new JComboBox( new ExtendedComboBoxModel() );
operationCombo.setPreferredSize( new Dimension( 150, 20 ) );
operationCombo.addItemListener( new OperationComboListener() );
toolbar.addLabeledFixed( "Operation", operationCombo );
WsdlOperation operation = getModelItem().getOperation();
interfaceCombo.setSelectedItem( operation == null ? null : operation.getInterface().getName() );
operationCombo.setSelectedItem( operation == null ? null : operation.getName() );
toolbar.addGlue();
toolbar.addFixed( createActionButton( new ShowOnlineHelpAction( HelpUrls.MOCKOPERATION_HELP_URL ), true ) );
return toolbar;
}