Examples of XFormDialogBuilder


Examples of com.eviware.x.form.XFormDialogBuilder

    return true;
  }

  private void buildDialog()
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Valid HTTP status codes Assertion" );
    XForm mainForm = builder.createForm( "Basic" );

    mainForm.addTextField( CODES, "Comma-separated acceptable status codes", XForm.FieldType.TEXTAREA ).setWidth( 40 );

    // TODO : update help URL
    dialog = builder.buildDialog(
        builder.buildOkCancelHelpActions( HelpUrls.SECURITY_VALID_HTTP_CODES_ASSERTION_HELP ), "Specify codes",
        UISupport.OPTIONS_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    return true;
  }

  private void buildDialog()
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Invalid HTTP status codes Assertion" );
    XForm mainForm = builder.createForm( "Basic" );

    mainForm.addTextField( CODES, "Comma-separated not acceptable status codes", XForm.FieldType.TEXTAREA ).setWidth(
        40 );

    // TODO : update help URL
    dialog = builder.buildDialog(
        builder.buildOkCancelHelpActions( HelpUrls.SECURITY_INVALID_HTTP_CODES_ASSERTION_HELP ), "Specify codes",
        UISupport.OPTIONS_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    return false;
  }

  private void buildDialog()
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Max Errors Assertion" );
    XForm form = builder.createForm( "Basic" );

    form.addTextField( NAME_FIELD, "Name of this assertion", FieldType.TEXT );
    form.addTextField( MAX_ABSOLUTE_ERRORS_FIELD, "Maximum number of errors before failing", FieldType.TEXT );
    form.addTextField( MAX_RELATIVE_ERRORS_FIELD, "Relative maximum number of errors before failing (0-1)",
        FieldType.TEXT );
    form.addComboBox( TEST_STEP_FIELD, new String[0], "TestStep to assert" );

    dialog = builder.buildDialog(
        builder.buildOkCancelHelpActions( HelpUrls.MAX_ERRORS_LOAD_TEST_ASSERTION_HELP_URL ),
        "Specify options for this Max Errors Assertion", UISupport.OPTIONS_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    setConfiguration( builder.finish() );
  }

  private void buildDialog()
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Step TPS Assertion" );
    XForm form = builder.createForm( "Basic" );

    form.addTextField( TestStepTpsAssertion.NAME_FIELD, "Name of this assertion", FieldType.TEXT );
    form.addTextField( TestStepTpsAssertion.MINIMUM_REQUESTS_FIELD, "Minimum steps before asserting", FieldType.TEXT );
    form.addTextField( TestStepTpsAssertion.MIN_VALUE_FIELD, "Minimum required step TPS", FieldType.TEXT );
    form.addTextField( TestStepTpsAssertion.MAX_ERRORS_FIELD, "Maximum number of errors before failing",
        FieldType.TEXT );
    form.addComboBox( TestStepTpsAssertion.TEST_STEP_FIELD, new String[0], "TestStep to assert" );

    dialog = builder.buildDialog( builder.buildOkCancelHelpActions( HelpUrls.STEP_TPS_LOAD_TEST_ASSERTION_HELP_URL ),
        "Specify options for this Step TPS Assertion", UISupport.OPTIONS_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    return false;
  }

  private void buildDialog()
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Step Status Assertion" );
    XForm form = builder.createForm( "Basic" );

    form.addTextField( NAME_FIELD, "Name of this assertion", FieldType.TEXT );
    form.addTextField( MINIMUM_REQUESTS_FIELD, "Minimum number of runs before asserting", FieldType.TEXT );
    form.addTextField( MAX_ERRORS_FIELD, "Maximum number of errors before failing", FieldType.TEXT );
    form.addComboBox( TEST_STEP_FIELD, new String[0], "TestStep to assert" );

    dialog = builder.buildDialog(
        builder.buildOkCancelHelpActions( HelpUrls.STEP_STATUS_LOAD_TEST_ASSERTION_HELP_URL ),
        "Specify options for this Step Status Assertion", UISupport.OPTIONS_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    setConfiguration( builder.finish() );
  }

  private void buildDialog()
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Step Average Assertion" );
    XForm form = builder.createForm( "Basic" );

    form.addTextField( NAME_FIELD, "Name of this assertion", FieldType.TEXT );
    form.addTextField( MINIMUM_REQUESTS_FIELD, "Minimum number of steps before asserting", FieldType.TEXT );
    form.addTextField( MAX_AVERAGE_FIELD, "Maximum allowed average step time", FieldType.TEXT );
    form.addTextField( MAX_ERRORS_FIELD, "Maximum number of allowed errors before failing loadtest (-1 = unlimited)",
        FieldType.TEXT );
    form.addTextField( SAMPLE_INTERVAL_FIELD, "Step count interval between sampling", FieldType.TEXT );
    form.addComboBox( TEST_STEP_FIELD, new String[0], "TestStep to assert" );

    dialog = builder.buildDialog(
        builder.buildOkCancelHelpActions( HelpUrls.STEP_AVERAGE_LOAD_TEST_ASSERTION_HELP_URL ),
        "Specify options for this Step Average Assertion", UISupport.OPTIONS_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    setConfiguration( builder.finish() );
  }

  private void buildDialog()
  {
    XFormDialogBuilder builder = XFormFactory.createDialogBuilder( "Step Maximum Assertion" );
    XForm form = builder.createForm( "Basic" );

    form.addTextField( TestStepMaxAssertion.NAME_FIELD, "Name of this assertion", FieldType.TEXT );
    form.addTextField( TestStepMaxAssertion.MINIMUM_REQUESTS_FIELD, "Minimum steps before asserting", FieldType.TEXT );
    form.addTextField( TestStepMaxAssertion.MAX_VALUE_FIELD, "Maximum allowed step time", FieldType.TEXT );
    form.addTextField( TestStepMaxAssertion.MAX_ERRORS_FIELD, "Maximum number of errors before failing",
        FieldType.TEXT );
    form.addComboBox( TestStepMaxAssertion.TEST_STEP_FIELD, new String[0], "TestStep to assert" );

    dialog = builder.buildDialog(
        builder.buildOkCancelHelpActions( HelpUrls.STEP_MAXIMUM_LOAD_TEST_ASSERTION_HELP_URL ),
        "Specify options for this Step Maximum Assertion", UISupport.OPTIONS_ICON );
  }
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

    public XFormDialog buildDialog(MessageSupport messages, String helpUrl) {
        return buildDialog(messages, helpUrl, null);
    }

    public XFormDialog buildDialog(MessageSupport messages, String helpUrl, AbstractAction actionToBeAdded) {
        XFormDialogBuilder newDialogBuilder = XFormFactory.createDialogBuilder(messages.get("Title"));
        XForm form = newDialogBuilder.createForm("");
        uriLabelKey = messages.get("Form.URI.Label");
        exampleUri = messages.get("Form.Example.URI");
        form.addTextField(uriLabelKey, messages.get("Form.URI.Description"), XForm.FieldType.TEXT);

        ActionList actions = newDialogBuilder.buildOkCancelHelpActions(helpUrl);

        if (actionToBeAdded != null) {
            actions.addAction(actionToBeAdded);
        }

        dialog = newDialogBuilder.buildDialog(actions, messages.get("Description"), UISupport.TOOL_ICON);
        dialog.setValue(uriLabelKey, exampleUri);
        XFormField uriField = dialog.getFormField(uriLabelKey);

        if (uriField instanceof JTextFieldFormField) {
            defaultURIReplaced = false;
View Full Code Here

Examples of com.eviware.x.form.XFormDialogBuilder

            throw new RuntimeException("formClass is not annotated correctly..");
        }

        MessageSupport messages = MessageSupport.getMessages(formClass);

        XFormDialogBuilder builder = XFormFactory.createDialogBuilder(messages.get(formAnnotation.name()));
        XForm form = createForm(builder, layout);

        for (Field field : formClass.getFields()) {
            AField fieldAnnotation = field.getAnnotation(AField.class);
            if (fieldAnnotation != null) {
                try {
                    addFormField(form, field, fieldAnnotation, messages);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }

        ActionList defaultActions = StringUtils.isBlank(formAnnotation.helpUrl()) ? builder.buildOkCancelActions() : builder
                .buildOkCancelHelpActions(formAnnotation.helpUrl());

        if (actions == null) {
            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.XFormDialogBuilder

            throw new RuntimeException("formClass is not annotated correctly..");
        }

        MessageSupport messages = MessageSupport.getMessages(formClass);

        XFormDialogBuilder builder = XFormFactory.createDialogBuilder(messages.get(formAnnotation.name()));
        XForm form = createForm(builder, null);

        for (Field field : formClass.getFields()) {
            AField fieldAnnotation = field.getAnnotation(AField.class);
            if (fieldAnnotation != null) {
                try {
                    addFormField(form, field, fieldAnnotation, messages);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }

        ActionList defaultActions = StringUtils.isBlank(formAnnotation.helpUrl()) ? null : builder.buildHelpActions(formAnnotation
                .helpUrl());

        if (actions == null) {
            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
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.