use of cbit.vcell.client.task.DocumentToExport in project vcell by virtualcell.
the class ClientRequestManager method exportDocument.
/**
* Comment
*/
public void exportDocument(TopLevelWindowManager manager, FileFilter forceFilefilter) {
/* block window */
JFrame currentWindow = getMdiManager().blockWindow(manager.getManagerID());
/* prepare hashtable for tasks */
Hashtable<String, Object> hash = new Hashtable<String, Object>();
hash.put("mdiManager", getMdiManager());
hash.put(DocumentManager.IDENT, getDocumentManager());
hash.put("topLevelWindowManager", manager);
hash.put("currentWindow", currentWindow);
hash.put("userPreferences", getUserPreferences());
if (forceFilefilter != null) {
hash.put(ChooseFile.FORCE_FILE_FILTER, forceFilefilter);
}
/* create tasks */
// get document to be exported
AsynchClientTask documentToExport = new DocumentToExport();
// get file
AsynchClientTask chooseFile = new ChooseFile();
// export it
AsynchClientTask exportDocument = new ExportDocument();
// clean-up
AsynchClientTask finishExport = new FinishExport();
// assemble array
AsynchClientTask[] tasks = null;
tasks = new AsynchClientTask[] { documentToExport, chooseFile, exportDocument, finishExport };
/* run tasks */
ClientTaskDispatcher.dispatch(currentWindow, hash, tasks, false);
}
Aggregations