use of org.vcell.util.gui.ExecutableFinderDialog in project vcell by virtualcell.
the class DocumentWindow method startVCellVisIt.
private void startVCellVisIt() {
AsynchClientTask findVisitTask = new AsynchClientTask("Searching for VisIt...", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
@Override
public void run(Hashtable<String, Object> hashTable) throws Exception {
try {
VisitSupport.launchVisTool(VCellConfiguration.getFileProperty(PropertyLoader.visitExe));
} catch (Exception e) {
e.printStackTrace();
OperatingSystemInfo osi = OperatingSystemInfo.getInstance();
String executableName = ResourceUtil.getExecutableName(VisitSupport.VISIT_EXEC_NAME, false, osi);
File executableLocation = new ExecutableFinderDialog(DocumentWindow.this, "If VisIt is installed (from " + "https://wci.llnl.gov/codes/visit/" + ") but not in the system path, then press press '" + ExecutableFinderDialog.FIND + "' and navigate to '" + executableName + "'.\nElse please install VisIt, restart VCell, and try again").find(executableName);
VisitSupport.launchVisTool(executableLocation);
}
}
};
ProgressDialogListener progressDialogListener = new ProgressDialogListener() {
@Override
public void cancelButton_actionPerformed(EventObject newEvent) {
System.out.println(newEvent);
}
};
// ClientTaskDispatcher.dispatch(requester, hash, tasks, customDialog, bShowProgressPopup, bKnowProgress, cancelable, progressDialogListener, bInputBlocking);
ClientTaskDispatcher.dispatch(DocumentWindow.this, new Hashtable<>(), new AsynchClientTask[] { findVisitTask }, null, true, false, true, progressDialogListener, false);
}
Aggregations