コード例 #1
0
 void cmdOpen() throws FileNotFoundException, SAXException, IOException {
   if (!discardUnsavedChanges()) return;
   // try {
   // final FileOpenService fos = (FileOpenService) ServiceManager
   // .lookup("javax.jnlp.BasicService");
   // final FileContents fc = fos.openFileDialog("/home/m", new
   // String[]{".jcx", ".jcz"});
   // if(fc != null)
   // log.info(fc.getName());
   // } catch (UnavailableServiceException e) {
   // throw new RuntimeException("Uncaught exception", e);
   // }
   if (!chooseLoadFile(getCurrentFile() == null ? new File(".") : getCurrentFile())) return;
   SetupIO.load(getCurrentFile(), mod_locations, mod_speeds, null, null);
   lastSaved = System.currentTimeMillis();
 }
コード例 #2
0
 private void save(File f) throws SAXException, IOException {
   SetupIO.save(f, mod_locations, mod_speeds, null, null);
   lastSaved = System.currentTimeMillis();
   refreshTitle();
 }
コード例 #3
0
 private void load(final File f, final PositionSet pos)
     throws FileNotFoundException, SAXException, IOException {
   SetupIO.load(f, pos, null, null, null);
 }