private void extraInit() {
    addSynapses();

    jTextFieldDelay.setText(mySynProps.getDelayGenerator().toShortString());
    jTextFieldWeights.setText(mySynProps.getWeightsGenerator().toShortString());
    jTextFieldThreshold.setText(mySynProps.getThreshold() + "");

    jComboBoxSynapseType.setSelectedItem(mySynProps.getSynapseType());
  }
  private boolean addSynapses() {
    // ModFile[] inbuiltSynapses = ModFileHelper.getSynapseModFilesInDir(new
    // File(GeneralProperties.getModTemplateDirectory()));

    Vector synapticTypes = project.cellMechanismInfo.getAllChemElecSynMechNames();

    for (int i = 0; i < synapticTypes.size(); i++) {
      jComboBoxSynapseType.addItem(synapticTypes.elementAt(i));

      if (this.mySynProps.getSynapseType().equals(synapticTypes.elementAt(i))) {
        jComboBoxSynapseType.setSelectedItem(synapticTypes.elementAt(i));
      }
    }
    /*
            ModFile[] mods = null;


            File neuronCodeDir = new File(project.getProjectFile()
                                    + System.getProperty("file.separator")
                                    + GeneralProperties.getDirForNeuronCode());

            mods = ModFileHelper.getSynapseModFilesInDir(neuronCodeDir);

            for (int i = 0; i < mods.length; i++)
            {
                jComboBoxSynapseType.addItem(mods[i]);
                if (this.mySynProps.synapseType.equals(mods[i].myNeuronElement.getProcessName()))
                {
                    jComboBoxSynapseType.setSelectedItem(mods[i]);
                }

            }
    */

    return true;
  }
  void jButtonOK_actionPerformed(ActionEvent e) {
    logger.logComment("OK button pressed");
    cancelled = false;

    double threshold;

    try {
      threshold = Double.parseDouble(jTextFieldThreshold.getText());
    } catch (NumberFormatException ex) {
      GuiUtils.showErrorMessage(
          logger,
          "Please enter a number (usually -50 -> 0) for the millivolt value of the firing threshold",
          ex,
          this);
      return;
    }
    mySynProps.setThreshold(threshold);

    String selectedSynapse = (String) jComboBoxSynapseType.getSelectedItem();

    mySynProps.setSynapseType(selectedSynapse);

    this.dispose();
  }