Ejemplo n.º 1
0
  private void buildDialog() {
    dialog =
        new SwingConfigurationDialogImpl(
            "SoapUI Preferences",
            HelpUrls.PREFERENCES_HELP_URL,
            "Set global SoapUI settings",
            UISupport.OPTIONS_ICON);

    tabs = new JTabbedPane();
    tabs.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT);
    tabs.setTabPlacement(JTabbedPane.LEFT);
    for (Prefs pref : prefs) {
      tabs.addTab(pref.getTitle(), new JScrollPane(pref.getForm().getPanel()));
    }

    dialog.setContent(UISupport.createTabPanel(tabs, false));
  }
Ejemplo n.º 2
0
  public boolean show(String initialTab) {
    if (dialog == null) buildDialog();

    Settings settings = SoapUI.getSettings();
    for (Prefs pref : prefs) pref.setFormValues(settings);

    if (initialTab != null) {
      int ix = tabs.indexOfTab(initialTab);
      if (ix != -1) tabs.setSelectedIndex(ix);
    }

    if (dialog.show(new StringToStringMap())) {
      for (Prefs pref : prefs) pref.getFormValues(settings);

      return true;
    }

    return false;
  }