Search in sources :

Example 1 with DocumentToExport

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);
}
Also used : AsynchClientTask(cbit.vcell.client.task.AsynchClientTask) JFrame(javax.swing.JFrame) Hashtable(java.util.Hashtable) DocumentToExport(cbit.vcell.client.task.DocumentToExport) CSGObject(cbit.vcell.geometry.CSGObject) ChooseFile(cbit.vcell.client.task.ChooseFile) FinishExport(cbit.vcell.client.task.FinishExport) ExportDocument(cbit.vcell.client.task.ExportDocument)

Aggregations

AsynchClientTask (cbit.vcell.client.task.AsynchClientTask)1 ChooseFile (cbit.vcell.client.task.ChooseFile)1 DocumentToExport (cbit.vcell.client.task.DocumentToExport)1 ExportDocument (cbit.vcell.client.task.ExportDocument)1 FinishExport (cbit.vcell.client.task.FinishExport)1 CSGObject (cbit.vcell.geometry.CSGObject)1 Hashtable (java.util.Hashtable)1 JFrame (javax.swing.JFrame)1