/**
   * @param logs
   * @param firstOrg
   * @param secondOrg
   * @return
   */
  private ProMSplitPane additionalDependencyPanelCreator(
      OrganizationalLogs logs, int firstOrg, int secondOrg) {
    ProMSplitPane splitPanelRefinedActivity = new ProMSplitPane();
    splitPanelRefinedActivity.setBackground(null);

    ProMTable comp = additionalDependencyTableCreator(logs, firstOrg, secondOrg);
    if (comp == null) return null;

    JTextPane textField = new JTextPane();
    textField.setContentType("text/html");
    textField.setText(
        fontBlack6
            + "Additional Dependencies ("
            + comp.getTable().getRowCount()
            + ")</font><hr>"
            + fontBlack4
            + " This pattern is a special case of different dependencies where one set of activities includes the other and results with additional dependencies. In the list you can see additional dependency sets in two organizations as "
            + logs.organizationNames.get(firstOrg)
            + "(Selected) and "
            + logs.organizationNames.get(secondOrg)
            + "(Other).");
    textField.setEditable(false);
    textField.setBackground(new Color(192, 192, 192));
    JScrollPane scrollPane = new JScrollPane(textField);
    scrollPane.setPreferredSize(new Dimension(500, 0));

    splitPanelRefinedActivity.setLeftComponent(comp);
    splitPanelRefinedActivity.setRightComponent(scrollPane);
    return splitPanelRefinedActivity;
  }
  /**
   * @param logs
   * @param firstOrg
   * @param secondOrg
   * @return
   */
  private ProMSplitPane differentConditionsPanelCreator(
      OrganizationalLogs logs, int firstOrg, int secondOrg) {
    ProMSplitPane splitPanelRefinedActivity = new ProMSplitPane();
    splitPanelRefinedActivity.setBackground(null);

    ProMTable comp = differentConditionsTableCreator(logs, firstOrg, secondOrg);
    if (comp == null) return null;

    JTextPane textField = new JTextPane();
    textField.setContentType("text/html");
    textField.setText(
        fontBlack6
            + "Different Conditions for Occurrence ("
            + comp.getTable().getRowCount()
            + ")</font><hr>"
            + fontBlack4
            + "Set of dependencies are same for two processes; however, occurrence condition is different in organizations. In the list you can see different occurrence conditions in two organizations as "
            + logs.organizationNames.get(firstOrg)
            + "(Selected) and "
            + logs.organizationNames.get(secondOrg)
            + "(Other).");
    textField.setEditable(false);
    textField.setBackground(new Color(192, 192, 192));
    JScrollPane scrollPane = new JScrollPane(textField);
    scrollPane.setPreferredSize(new Dimension(500, 0));

    splitPanelRefinedActivity.setLeftComponent(comp);
    splitPanelRefinedActivity.setRightComponent(scrollPane);
    return splitPanelRefinedActivity;
  }
  /**
   * @param logs
   * @param firstOrg
   * @param secondOrg
   * @return
   */
  private ProMSplitPane refinedActivityPanelCreator(
      OrganizationalLogs logs, int firstOrg, int secondOrg) {
    ProMSplitPane splitPanelRefinedActivity = new ProMSplitPane();
    splitPanelRefinedActivity.setBackground(null);

    ProMTable comp = refinedActivityTableCreator(logs, firstOrg, secondOrg);
    if (comp == null) return null;

    JTextPane textField = new JTextPane();
    textField.setContentType("text/html");
    textField.setText(
        fontBlack6
            + "Refined Activities ("
            + comp.getTable().getRowCount()
            + ")</font><hr>"
            + fontBlack4
            + "An activity exists in one process but, as an equivalent, a collection of activitiesare existing in the other process to achieve the same task. In the list you can see the refined activity in "
            + logs.organizationNames.get(firstOrg)
            + " and a potential list of activities in "
            + logs.organizationNames.get(secondOrg)
            + ".");
    textField.setEditable(false);
    textField.setBackground(new Color(192, 192, 192));
    JScrollPane scrollPane = new JScrollPane(textField);
    scrollPane.setPreferredSize(new Dimension(500, 0));

    splitPanelRefinedActivity.setLeftComponent(comp);
    splitPanelRefinedActivity.setRightComponent(scrollPane);
    return splitPanelRefinedActivity;
  }
  /**
   * @param logs
   * @param firstOrg
   * @param secondOrg
   * @return
   */
  private ProMSplitPane skippedActivityPanelCreator(
      OrganizationalLogs logs, int firstOrg, int secondOrg) {
    ProMSplitPane splitPanelSkippedActivity = new ProMSplitPane();
    splitPanelSkippedActivity.setBackground(null);

    ProMTable comp = null;
    if (firstOrg == secondOrg) {
      comp = skippedActivityTableCreator(logs, firstOrg);
    } else {
      comp = skippedActivityTableCreator(logs, secondOrg);
    }
    if (comp == null) return null;

    JTextPane textField = new JTextPane();
    textField.setContentType("text/html");
    if (firstOrg == secondOrg) {
      textField.setText(
          fontBlack6
              + "Skipped Activities ("
              + comp.getTable().getRowCount()
              + ") </font><hr>"
              + fontBlack4
              + " An activity exists in one process but no equivalent activity is found in the other process. In the list you can see the skipped activities in "
              + logs.organizationNames.get(firstOrg)
              + ".");
    } else {
      textField.setText(
          fontBlack6
              + "Skipped Activities ("
              + comp.getTable().getRowCount()
              + ")</font><hr>"
              + fontBlack4
              + " An activity exists in one process but no equivalent activity is found in the other process. In the list you can see the skipped activities in "
              + logs.organizationNames.get(secondOrg)
              + " compared to "
              + logs.organizationNames.get(firstOrg)
              + ".");
    }
    textField.setEditable(false);
    textField.setBackground(new Color(192, 192, 192));
    JScrollPane scrollPane = new JScrollPane(textField);
    scrollPane.setPreferredSize(new Dimension(500, 0));

    splitPanelSkippedActivity.setLeftComponent(comp);
    splitPanelSkippedActivity.setRightComponent(scrollPane);
    return splitPanelSkippedActivity;
  }
  /**
   * Create header panel
   *
   * @param logs
   * @param factory
   * @return
   */
  private ProMSplitPane createHeaderPanel(final OrganizationalLogs logs, SlickerFactory factory) {
    ProMSplitPane headerPanel = new ProMSplitPane(ProMSplitPane.HORIZONTAL_SPLIT);

    {
      JTextPane headerExplanation = new JTextPane();
      headerExplanation.setContentType("text/html");
      headerExplanation.setText(
          fontBlack6
              + "Mismatch Pattern Analysis without Performance Clustering</font><hr>"
              + fontBlack4
              + " Select an organization from left and click \"Analyze\" to list mismatch patterns compared to other organizations.");
      headerExplanation.setEditable(false);
      headerExplanation.setBackground(null);
      headerPanel.setRightComponent(headerExplanation);
    }

    {
      JPanel headerLeftPanel = new JPanel();
      headerLeftPanel.setBackground(null);
      headerLeftPanel.setLayout(new GridBagLayout());
      {
        List<String> organizationList = new ArrayList<String>();
        if (logs != null) {

          organizationList.addAll(logs.organizationNames);
        }
        organizationCombo = factory.createComboBox(organizationList.toArray());

        GridBagConstraints organizationComboConstraint = new GridBagConstraints();
        organizationComboConstraint.gridx = 0;
        organizationComboConstraint.gridy = 1;

        organizationComboConstraint.anchor = GridBagConstraints.WEST;

        organizationCombo.addActionListener(
            (new ActionListener() {
              public void actionPerformed(ActionEvent arg0) {
                organizationName = (String) organizationCombo.getSelectedItem();
              }
            }));
        headerLeftPanel.add(organizationCombo, organizationComboConstraint);
      }
      {
        JLabel organizationComboLabel = factory.createLabel("Organization");
        GridBagConstraints organizationComboLabelConstraint = new GridBagConstraints();
        organizationComboLabelConstraint.gridx = 0;
        organizationComboLabelConstraint.gridy = 0;
        organizationComboLabelConstraint.fill = GridBagConstraints.HORIZONTAL;
        headerLeftPanel.add(organizationComboLabel, organizationComboLabelConstraint);
      }

      {
        JButton analyzeButton = factory.createButton("Analyze");
        GridBagConstraints analyzeButtonConstraint = new GridBagConstraints();
        analyzeButtonConstraint.gridx = 0;
        analyzeButtonConstraint.gridy = 3;
        analyzeButtonConstraint.gridwidth = 3;
        analyzeButtonConstraint.fill = GridBagConstraints.HORIZONTAL;
        analyzeButtonConstraint.anchor = GridBagConstraints.WEST;
        analyzeButton.addActionListener(
            (new ActionListener() {
              public void actionPerformed(ActionEvent arg0) {
                organizationName = (String) organizationCombo.getSelectedItem();
                if (!(organizationName.equals("Select") || organizationName.equals(""))) {
                  System.out.println(organizationName + " " + performanceDifferentThresholdValue);
                  analyzeClicked(logs);
                }
              }
            }));
        headerLeftPanel.add(analyzeButton, analyzeButtonConstraint);
      }
      headerPanel.setLeftComponent(headerLeftPanel);
    }
    return headerPanel;
  }