use of cbit.vcell.client.UserMessage in project vcell by virtualcell.
the class DocumentWindow method showTransMADialog.
public void showTransMADialog() {
String disclaimer = "Transforming reactions to stochastic capable cannot be undone. You may want to make a copy of the model.\nAlso some existing applications may need to be recreated in order to maintain consistency.\nLast but not least, stochastic transfomation may not be mathematically equivalent to the orignal model. \nDo you wish to proceed?";
JTextArea ta = new JTextArea(disclaimer);
ta.setEditable(false);
int userChoice = PopupGenerator.showComponentOKCancelDialog(this, ta, "Model Transformation Warning");
if (userChoice != JOptionPane.OK_OPTION) {
return;
}
BioModel biomodel = null;
if (getWindowManager().getVCDocument() instanceof BioModel) {
biomodel = (BioModel) getWindowManager().getVCDocument();
}
TransformMassActionPanel transMAPanel = new TransformMassActionPanel();
transMAPanel.setModel(biomodel.getModel());
int choice = DialogUtils.showComponentOKCancelDialog(this, transMAPanel, "Transform to Stochastic Capable Model");
if (choice == JOptionPane.OK_OPTION) {
try {
transMAPanel.saveTransformedReactions();
} catch (Exception e) {
PopupGenerator.showWarningDialog(getTopLevelWindowManager(), null, new UserMessage(e.getMessage(), new String[] { "Ok" }, "Ok"), null);
}
}
}
Aggregations