public boolean openPathway(final File f) { final ProgressKeeper pk = new ProgressKeeper(); final ProgressDialog d = new ProgressDialog( JOptionPane.getFrameForComponent(getApplicationPanel()), "", pk, false, true); engine.setWrapper(createWrapper()); SwingWorker<Boolean, Boolean> sw = new SwingWorker<Boolean, Boolean>() { protected Boolean doInBackground() { pk.setTaskName("Opening pathway"); try { engine.openPathway(f); return true; } catch (ConverterException e) { handleConverterException(e.getMessage(), null, e); return false; } finally { pk.finished(); } } }; return processTask(pk, d, sw); }
public void newPathway() { engine.setWrapper(createWrapper()); engine.newPathway(); }