use of org.vcell.util.document.VCDocument.DocumentCreationInfo in project vcell by virtualcell.
the class DatabaseWindowManager method createNewGeometry.
public void createNewGeometry() {
AsynchClientTask editSelectTask = new AsynchClientTask("Edit/Apply Geometry", AsynchClientTask.TASKTYPE_SWING_BLOCKING) {
@Override
public void run(Hashtable<String, Object> hashTable) throws Exception {
Geometry newGeom = (Geometry) hashTable.get("doc");
if (newGeom == null) {
throw new Exception("No Geometry found in edit task");
}
DocumentCreationInfo documentCreationInfo = new DocumentCreationInfo(VCDocumentType.GEOMETRY_DOC, -1);
documentCreationInfo.setPreCreatedDocument(newGeom);
AsynchClientTask[] newGeometryTaskArr = getRequestManager().newDocument(DatabaseWindowManager.this, documentCreationInfo);
ClientTaskDispatcher.dispatch(DatabaseWindowManager.this.getComponent(), hashTable, newGeometryTaskArr);
}
};
createGeometry(null, new AsynchClientTask[] { editSelectTask }, TopLevelWindowManager.DEFAULT_CREATEGEOM_SELECT_DIALOG_TITLE, "Create Geometry", null);
}
Aggregations