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; }