public void setLevel(Level level) {
   LogService.getRoot().setLevel(level);
   handler.setLevel(level);
   ParameterService.setParameterValue(
       MainFrame.PROPERTY_RAPIDMINER_GUI_LOG_LEVEL, level.getName());
   ParameterService.saveParameters();
 }
  public static String selectLocation(
      RepositoryLocation resolveRelativeTo,
      String initialValue,
      Component c,
      final boolean selectEntries,
      final boolean selectFolder,
      final boolean forceDisableRelativeResolve,
      final boolean enforceValidRepositoryEntryName,
      final boolean onlyWriteableRepositories) {
    final RepositoryLocationChooserDialog dialog =
        new RepositoryLocationChooserDialog(
            resolveRelativeTo,
            initialValue,
            selectEntries,
            selectFolder,
            onlyWriteableRepositories);
    if (forceDisableRelativeResolve) {
      dialog.chooser.setResolveRelative(false);
      if (dialog.chooser.resolveBox != null) {
        dialog.chooser.resolveBox.setVisible(false);
      }
    }
    dialog.chooser.setEnforceValidRepositoryEntryName(enforceValidRepositoryEntryName);
    if (enforceValidRepositoryEntryName) {
      dialog.chooser.locationFieldRepositoryEntry.addObserver(dialog, true);
    }
    dialog.setVisible(true);

    // if user has used double click to submit
    if (dialog.userSelection != null) {
      return dialog.userSelection;
    }
    if (dialog.wasConfirmed()) {
      if (resolveRelativeTo != null && !forceDisableRelativeResolve) {
        ParameterService.setParameterValue(
            RapidMinerGUI.PROPERTY_RESOLVE_RELATIVE_REPOSITORY_LOCATIONS,
            dialog.chooser.resolveRelative() ? "true" : "false");
        ParameterService.saveParameters();
      }
      String text;
      try {
        text = dialog.chooser.getRepositoryLocation();
      } catch (MalformedRepositoryLocationException e) {
        // this should not happen since the dialog would not have disposed without an error message.
        throw new RuntimeException(e);
      }
      if (text.length() > 0) {
        return text;
      } else {
        return null;
      }
    } else {
      return null;
    }
  }
  @Override
  public void windowClosed(WindowEvent e) {
    boolean betaActiveNow =
        Boolean.parseBoolean(
            ParameterService.getParameterValue(
                RapidMiner.PROPERTY_RAPIDMINER_UPDATE_BETA_FEATURES));
    if (!betaActiveBefore && betaActiveNow) {
      JTextArea textArea = new JTextArea();
      textArea.setColumns(60);
      textArea.setRows(15);
      textArea.setLineWrap(true);
      textArea.setWrapStyleWord(true);
      textArea.setEditable(false);
      textArea.setText(loadBetaEULA());
      textArea.setBorder(null);
      textArea.setCaretPosition(0);

      JScrollPane scrollPane = new ExtendedJScrollPane(textArea);
      scrollPane.setBorder(BorderFactory.createLineBorder(Colors.TEXTFIELD_BORDER));

      ButtonDialog dialog =
          new ButtonDialogBuilder("beta_features_eula")
              .setOwner(ApplicationFrame.getApplicationFrame())
              .setButtons(DefaultButtons.OK_BUTTON, DefaultButtons.CANCEL_BUTTON)
              .setModalityType(ModalityType.APPLICATION_MODAL)
              .setContent(scrollPane, ButtonDialog.DEFAULT_SIZE)
              .build();
      dialog.setVisible(true);
      if (!dialog.wasConfirmed()) {
        ParameterService.setParameterValue(
            RapidMiner.PROPERTY_RAPIDMINER_UPDATE_BETA_FEATURES, String.valueOf(false));
        ActionStatisticsCollector.INSTANCE.log(
            ActionStatisticsCollector.TYPE_BETA_FEATURES,
            ActionStatisticsCollector.VALUE_BETA_FEATURES_ACTIVATION,
            "cancelled");
      }
    }
  }