use of cbit.vcell.client.task.AsynchClientTask in project vcell by virtualcell.
the class DefineROI_RoiForErrorDescriptor method preNextProcess.
public ArrayList<AsynchClientTask> preNextProcess() {
ArrayList<AsynchClientTask> tasks = new ArrayList<AsynchClientTask>();
AsynchClientTask aTask1 = new AsynchClientTask("Saving selected ROIs...", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
boolean[] selectedROIs = ((DefineROI_RoiForErrorPanel) getPanelComponent()).getSelectedROIs();
boolean isOneSelected = false;
for (int i = 0; i < selectedROIs.length; i++) {
if (selectedROIs[i]) {
isOneSelected = true;
break;
}
}
if (isOneSelected) {
frapWorkspace.getWorkingFrapStudy().setSelectedROIsForErrorCalculation(selectedROIs);
} else {
throw new Exception("At least one ROI has to be selected.");
}
}
};
tasks.add(aTask1);
return tasks;
}
use of cbit.vcell.client.task.AsynchClientTask in project vcell by virtualcell.
the class EstParams_ReacBindingDescriptor method preBackProcess.
// save model parameters also when go back
public ArrayList<AsynchClientTask> preBackProcess() {
// create AsynchClientTask arraylist
ArrayList<AsynchClientTask> taskArrayList = new ArrayList<AsynchClientTask>();
AsynchClientTask saveParametersTask = new AsynchClientTask("", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
saveModelParameters();
}
};
taskArrayList.add(saveParametersTask);
return taskArrayList;
}
use of cbit.vcell.client.task.AsynchClientTask in project vcell by virtualcell.
the class EstParams_ReacBindingDescriptor method preNextProcess.
// save model parameters when go next
public ArrayList<AsynchClientTask> preNextProcess() {
// create AsynchClientTask arraylist
ArrayList<AsynchClientTask> taskArrayList = new ArrayList<AsynchClientTask>();
AsynchClientTask saveParametersTask = new AsynchClientTask("", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
saveModelParameters();
}
};
taskArrayList.add(saveParametersTask);
return taskArrayList;
}
use of cbit.vcell.client.task.AsynchClientTask in project vcell by virtualcell.
the class EstParams_ReactionOffRateDescriptor method preNextProcess.
// save model parameters
public ArrayList<AsynchClientTask> preNextProcess() {
// create AsynchClientTask arraylist
ArrayList<AsynchClientTask> taskArrayList = new ArrayList<AsynchClientTask>();
AsynchClientTask saveParametersTask = new AsynchClientTask("", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
Parameter[] params = ((EstParams_ReactionOffRatePanel) getPanelComponent()).getCurrentParameters();
FRAPModel frapModel = getFrapWorkspace().getWorkingFrapStudy().getFrapModel(FRAPModel.IDX_MODEL_REACTION_OFF_RATE);
frapModel.setModelParameters(params);
frapModel.setData(((EstParams_ReactionOffRatePanel) getPanelComponent()).getCurrentEstimationResults());
}
};
taskArrayList.add(saveParametersTask);
return taskArrayList;
}
use of cbit.vcell.client.task.AsynchClientTask in project vcell by virtualcell.
the class EstParams_TwoDiffComponentDescriptor method preBackProcess.
// save model parameters also when go back
public ArrayList<AsynchClientTask> preBackProcess() {
// create AsynchClientTask arraylist
ArrayList<AsynchClientTask> taskArrayList = new ArrayList<AsynchClientTask>();
AsynchClientTask saveParametersTask = new AsynchClientTask("", AsynchClientTask.TASKTYPE_NONSWING_BLOCKING) {
public void run(Hashtable<String, Object> hashTable) throws Exception {
saveModelParameters();
}
};
taskArrayList.add(saveParametersTask);
return taskArrayList;
}
Aggregations