private static final long serialVersionUID = -8249962982351770507L;
public static void calculate(MainFrame theFrame) {
switch (theFrame.getSelectedCalculationMethod()) {
case NmrInCalculateButtonActionListener.DB_SEARCH_USING_2D_NMR:
DBSearcher theSearcher = new DBSearcher(new File(theFrame.getFilePathTextFieldList().get(NmrInCalculateButtonActionListener.INPUT_MOLECULE_FILE_PATH_INDEX_IN_DB_SEARCHER).getText()),
Integer.parseInt(theFrame.getFilePathTextFieldList().get(NmrInCalculateButtonActionListener.MAXIMUM_QUTENARY_TOPOLOGICAL_DISTANCE_INDEX_IN_DB_SEARCHER).getText()),
Integer.parseInt(theFrame.getFilePathTextFieldList().get(NmrInCalculateButtonActionListener.MAXIMUM_OTHER_TOPOLOGICAL_DISTANCE_INDEX_IN_DB_SEARCHER).getText()));
theSearcher.searchMatchedMoleculeIn2DNMR();
theSearcher.writeResultMoleculeSet(new File(theFrame.getFilePathTextFieldList().get(NmrInCalculateButtonActionListener.RESULT_FILE_PATH_INDEX_IN_DB_SEARCHER).getText()));
break;
case NmrInCalculateButtonActionListener.HOSE_CODE_GENERATION:
HoseCodeGenerator.generateHoseCode(theFrame.getFilePathTextFieldList().get(NmrInCalculateButtonActionListener.INPUT_MOLECULE_FILE_PATH_INDEX_IN_HOSE_CODE_GENERATOR).getText(),
theFrame.getFilePathTextFieldList().get(NmrInCalculateButtonActionListener.RESULT_MOLECULE_FILE_PATH_INDEX_IN_HOSE_CODE_GENERATOR).getText(),
Integer.parseInt(theFrame.getFilePathTextFieldList().get(NmrInCalculateButtonActionListener.LEVEL_OF_HOSE_CODE_INDEX_IN_HOSE_CODE_GENERATOR).getText()));