Examples of XFormDialog


Examples of com.eviware.x.form.XFormDialog

    }

    @Override
    public void actionPerformed( ActionEvent arg0 )
    {
      XFormDialog dialog = createAddParameterDialog();
      dialog.show();
      model.fireTableDataChanged();
    }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

    @Override
    public void actionPerformed( ActionEvent e )
    {
      if( table.getSelectedRow() > -1 )
      {
        XFormDialog dialog = createAddParameterDialog();

        int row = table.getSelectedRow();
        initDialogForCopy( dialog, row );

        dialog.show();
        model.fireTableDataChanged();
      }
    }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

            actions = defaultActions;
        } else {
            actions.addActions(defaultActions);
        }

        XFormDialog dialog = builder.buildDialog(actions, messages.get(formAnnotation.description()),
                UISupport.createImageIcon(formAnnotation.icon()));

        return dialog;
    }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

            actions = defaultActions;
        } else {
            // since there is only one action do it like this
            actions.insertAction(defaultActions.getActionAt(0), 0);
        }
        XFormDialog dialog = builder.buildDialog(actions, messages.get(formAnnotation.description()),
                UISupport.createImageIcon(formAnnotation.icon()));

        return dialog;
    }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

            actions = defaultActions;
        } else {
            actions.addActions(defaultActions);
        }

        XFormDialog dialog = builder.buildDialog(actions, formAnnotation.description(),
                UISupport.createImageIcon(formAnnotation.icon()));

        return dialog;
    }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

        } else {
            defaultActions.addActions(actions);
            actions = defaultActions;
        }

        XFormDialog dialog = builder.buildDialog(actions, formAnnotation.description(),
                UISupport.createImageIcon(formAnnotation.icon()));

        return dialog;
    }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

            if (pageAnnotation != null) {
                buildForm(builder, pageAnnotation.name(), field.getType(), messages);
            }
        }

        XFormDialog dialog = builder.buildWizard(formAnnotation.description(),
                UISupport.createImageIcon(formAnnotation.icon()), formAnnotation.helpUrl());

        return dialog;
    }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

            putValue(Action.SHORT_DESCRIPTION, "Adds new type to use in security scan");
        }

        @Override
        public void actionPerformed(ActionEvent arg0) {
            XFormDialog dialog = ADialogBuilder.buildDialog(AddParameterActionDialog.class);
            JComboBoxFormField chooser = (JComboBoxFormField) dialog.getFormField(AddParameterActionDialog.TYPE);
            chooser.setOptions(typeMap.keySet().toArray(new String[0]));
            if (dialog.show()) {
                model.addNewType(typeMap.get(chooser.getValue()), dialog.getValue(AddParameterActionDialog.VALUE));
            }
        }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

    public void perform(WsdlInterface iface, Object param) {
        generateMockService(iface, false);
    }

    public void generateMockService(WsdlInterface iface, boolean atCreation) {
        XFormDialog dialog = ADialogBuilder.buildDialog(Form.class);
        dialog.setBooleanValue(Form.ADD_ENDPOINT, true);
        String[] names = ModelSupport.getNames(iface.getOperationList());
        dialog.setOptions(Form.OPERATIONS, names);
        XFormOptionsField operationsFormField = (XFormOptionsField) dialog.getFormField(Form.OPERATIONS);
        operationsFormField.setSelectedOptions(names);

        dialog.getFormField(Form.START_MOCKSERVICE).setEnabled(!atCreation);

        WsdlProject project = iface.getProject();
        String[] mockServices = ModelSupport.getNames(new String[]{CREATE_MOCKSUITE_OPTION},
                project.getMockServiceList());
        dialog.setOptions(Form.MOCKSERVICE, mockServices);

        dialog.setValue(Form.PATH, "/mock" + iface.getName());
        dialog.setValue(Form.PORT, "8088");

        if (dialog.show()) {
            List<String> operations = StringUtils.toStringList(operationsFormField.getSelectedOptions());
            if (operations.size() == 0) {
                UISupport.showErrorMessage("No Operations selected..");
                return;
            }

            String mockServiceName = dialog.getValue(Form.MOCKSERVICE);
            MockService mockService = getMockService(iface, project, mockServiceName);
            if (mockService == null) {
                return;
            }

            mockService.setPath(dialog.getValue(Form.PATH));

            try {
                mockService.setPort(Integer.parseInt(dialog.getValue(Form.PORT)));
            } catch (NumberFormatException e1) {
            }

            for (int i = 0; i < iface.getOperationCount(); i++) {
                Operation operation = iface.getOperationAt(i);
                if (!operations.contains(operation.getName())) {
                    continue;
                }

                MockOperation mockOperation = mockService.addNewMockOperation(operation);
                if (mockOperation != null) {
                    mockOperation.addNewMockResponse("Response 1");
                }
            }

            if (dialog.getBooleanValue(Form.ADD_ENDPOINT)) {
                iface.addEndpoint(mockService.getLocalEndpoint());
            }

            if (!atCreation) {
                WsdlMockServiceDesktopPanel desktopPanel = (WsdlMockServiceDesktopPanel) UISupport
                        .showDesktopPanel(mockService);

                if (dialog.getBooleanValue(Form.START_MOCKSERVICE)) {
                    desktopPanel.startMockService();
                    SoapUI.getDesktop().minimize(desktopPanel);
                }
            }
        }
View Full Code Here

Examples of com.eviware.x.form.XFormDialog

        super("Launch HTTP Monitor", "Launches a HTTP traffic monitor for this project");
    }

    public void perform(WsdlProject project, Object param) {
        DialogHandler dialogHandler = createDialogHandler(project, param);
        final XFormDialog dialog = dialogHandler.buildDialog();

        Settings settings = project.getSettings();

        dialogHandler.setDialogValues(settings);
        soapMonitor = null;
        if (dialog.show()) {
            try {
                UISupport.setHourglassCursor();

                dialogHandler.saveDialogValues(settings);
                loadAllInterfacesIn(project);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.