public JCollapsibleTablePanel(JTable table, String title) {
   super(new JPanel(), title);
   setTable(table);
   setMinusIcon(UISupport.createImageIcon("/minus.gif"));
   setPlusIcon(UISupport.createImageIcon("/plus.gif"));
   this.title = title;
 }
Beispiel #2
0
  public SimpleDialog(String title, String description, String helpUrl, boolean okAndCancel) {
    super(UISupport.getMainFrame(), title, true);

    buttons = UISupport.initDialogActions(buildActions(helpUrl, okAndCancel), this);
    buttons.setBorder(BorderFactory.createEmptyBorder(5, 0, 0, 0));

    getContentPane()
        .add(
            UISupport.buildDescription(
                title, description, UISupport.createImageIcon(UISupport.TOOL_ICON_PATH)),
            BorderLayout.NORTH);

    getContentPane().add(buildContent(), BorderLayout.CENTER);

    buttons.setBorder(
        BorderFactory.createCompoundBorder(
            BorderFactory.createCompoundBorder(
                BorderFactory.createMatteBorder(1, 0, 0, 0, Color.GRAY),
                BorderFactory.createMatteBorder(1, 0, 0, 0, Color.WHITE)),
            BorderFactory.createEmptyBorder(3, 5, 3, 5)));

    getContentPane().add(buttons, BorderLayout.SOUTH);
    modifyButtons();

    pack();
  }
  public WsdlGroovyScriptTestStep(
      WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
    super(testCase, config, true, forLoadTest);

    if (!forLoadTest) {
      okIcon = UISupport.createImageIcon("/groovy_script.gif");
      setIcon(okIcon);
      failedIcon = UISupport.createImageIcon("/groovy_script_failed.gif");
    }

    if (config.getConfig() == null) {
      if (!forLoadTest) saveScript(config);
    } else {
      readConfig(config);
    }

    addProperty(
        new DefaultTestStepProperty(
            "result",
            true,
            new DefaultTestStepProperty.PropertyHandlerAdapter() {

              public String getValue(DefaultTestStepProperty property) {
                return scriptResult == null ? null : scriptResult.toString();
              }
            },
            this));

    addProperty(new TestStepBeanProperty("script", false, this, "script", this));

    scriptEngine = SoapUIScriptEngineRegistry.create(this);
    scriptEngine.setScript(getScript());
    if (forLoadTest && !isDisabled())
      try {
        scriptEngine.compile();
      } catch (Exception e) {
        SoapUI.logError(e);
      }
  }
 private void updateStatusIcon() {
   AssertionStatus status = getModelItem().getTestRequest().getAssertionStatus();
   switch (status) {
     case FAILED:
       {
         assertionInspector.setIcon(UISupport.createImageIcon("/failed_assertion.gif"));
         inspectorPanel.activate(assertionInspector);
         break;
       }
     case UNKNOWN:
       {
         assertionInspector.setIcon(UISupport.createImageIcon("/unknown_assertion.png"));
         break;
       }
     case VALID:
       {
         assertionInspector.setIcon(UISupport.createImageIcon("/valid_assertion.gif"));
         inspectorPanel.deactivate();
         break;
       }
   }
 }
  public WsdlRunTestCaseTestStep(
      WsdlTestCase testCase, TestStepConfig config, boolean forLoadTest) {
    super(testCase, config, true, forLoadTest);

    if (config.getConfig() == null) {
      stepConfig =
          (RunTestCaseStepConfig) config.addNewConfig().changeType(RunTestCaseStepConfig.type);
      stepConfig.addNewProperties();
      stepConfig.addNewReturnProperties();
    } else {
      stepConfig =
          (RunTestCaseStepConfig) config.getConfig().changeType(RunTestCaseStepConfig.type);
    }

    if (stepConfig.getRunMode() == null) {
      stepConfig.setRunMode(RunTestCaseRunModeTypeConfig.PARALLELL);
    }

    setIcon(UISupport.createImageIcon("/run_testcase_step.gif"));

    propertyHolderSupport =
        new XmlBeansPropertiesTestPropertyHolder(this, stepConfig.getProperties());
  }
 public SavePropertiesAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/set_properties_target.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Saves current property-values to a file");
 }
 public LoadPropertiesAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/load_properties.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Loads property values from an external file");
 }
 public ClearPropertiesAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/clear.png"));
   putValue(Action.SHORT_DESCRIPTION, "Clears all current property values");
 }
 public RemovePropertyAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/delete.png"));
   putValue(Action.SHORT_DESCRIPTION, "Removes the selected property from the property list");
   setEnabled(false);
 }
Beispiel #10
0
 public AddPropertyAction() {
   super("Add Property");
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/add_property.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Adds a property to the property list");
 }
 public ExportStatisticsHistoryAction(JStatisticsGraph statisticsGraph) {
   this.graph = statisticsGraph;
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/export.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Export statistics history to a file");
 }
 public ReloadPropertiesFromSourceAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/reload_properties.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Reloads the current properties from the selected file");
 }
 public AddLoadTestAssertionAction() {
   super("Add Assertion");
   putValue(Action.SHORT_DESCRIPTION, "Adds an assertion to this LoadTest");
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/addAssertion.gif"));
 }
 public CancelRunTestCaseAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/stop_testcase.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Stops running this testcase");
 }
 public OptionsAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/options.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Sets Options");
 }
 public OpenTestCaseAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/testCase.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Opens the target TestCases editor");
 }
 public RunAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/run_testcase.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Runs the selected TestCases");
 }
Beispiel #18
0
 public TogglePropertiesAction() {
   putValue(SMALL_ICON, UISupport.createImageIcon("/toggle_properties.gif"));
 }
 public SortPropertiesAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/arrow_down.png"));
   putValue(Action.SHORT_DESCRIPTION, "Sorts properties alphabetically");
 }
 public AddTokenAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/add_property.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Adds a token to assertion");
 }
 public SetPropertiesSourceAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/set_properties_source.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Selects the properties source file");
 }
Beispiel #22
0
 public AddPartAction() {
   putValue(SMALL_ICON, UISupport.createImageIcon("/add_property.gif"));
   putValue(SHORT_DESCRIPTION, "Adds a new part");
 }
 public SetPropertiesTargetAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/set_properties_target.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Selects the properties target file");
 }
 public RunScriptAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/run.png"));
   putValue(
       Action.SHORT_DESCRIPTION, "Runs this script using mock httpRequest/httpResponse objects");
 }
 ConfigureAssertionAction() {
   super("Configure");
   putValue(Action.SHORT_DESCRIPTION, "Configures the selection assertion");
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/options.gif"));
   setEnabled(false);
 }
Beispiel #26
0
 public PropertiesModelItem(TestPropertyHolder holder) {
   super(
       "Properties (" + holder.getPropertyNames().length + ")",
       UISupport.createImageIcon("/properties_step.gif"));
   this.holder = holder;
 }
 public RemoveTokenAction() {
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/remove_property.gif"));
   putValue(Action.SHORT_DESCRIPTION, "Removes token from assertion");
 }
 public RemoveAssertionAction() {
   super("Remove Assertion");
   putValue(Action.SHORT_DESCRIPTION, "Removes the selected assertion from this LoadTest");
   putValue(Action.SMALL_ICON, UISupport.createImageIcon("/remove_assertion.gif"));
   setEnabled(false);
 }
Beispiel #29
0
 public RemovePartAction() {
   putValue(SMALL_ICON, UISupport.createImageIcon("/remove_property.gif"));
   putValue(SHORT_DESCRIPTION, "Removes the selected part");
   setEnabled(false);
 }
  public WsdlTestStepsModelItem(TestCase testCase) {
    super(createLabel(testCase), UISupport.createImageIcon("/teststeps.gif"));
    this.testCase = testCase;

    testCase.getTestSuite().addTestSuiteListener(listener);
  }