예제 #1
0
 public String exportMolFile() {
   MolfileWriter writer = new MolfileWriter();
   try {
     return writer.write(molecule);
   } catch (Exception e) {
     Window.alert("Error occured: " + e.getMessage());
   }
   return null;
 }
예제 #2
0
 public void importMolFile(String fileContent) {
   MolfileReader reader = new MolfileReader();
   Molecule molecule = new DefaultMolecule();
   try {
     reader.read(molecule, fileContent);
     setMolecule(molecule);
   } catch (Exception e) {
     Window.alert("Error occured: " + e.getMessage());
   }
 }