{ saver.saveObject(statsOverlay);
}
public void doSave(String filename) throws InvalidFilenameException, Exception
{ if(!filename.endsWith(".sim") )
throw new InvalidFilenameException("Filename must have .sim extension.");
setStatus("Saving simulation to " + filename);
XMLSaver saver=new XMLSaver(new File(filename));
saveAll(saver,getSimModel());
saver.close();
setStatus("Saved simulation to " + filename);