use of javax.swing.JDialog in project vcell by virtualcell.
the class ParameterEstimationRunTaskPanel method showCopasiMethodHelp.
public void showCopasiMethodHelp() {
CopasiOptimizationMethodType methodType = ((CopasiOptimizationMethodType) optimizationMethodComboBox.getSelectedItem());
getCopasiOptimizationHelpPanel().refreshSolverInfo(methodType);
JOptionPane helpPane = new JOptionPane(copasiHelpPanel, JOptionPane.INFORMATION_MESSAGE);
JDialog dialog = helpPane.createDialog(this, "Copasi Methods Help Information");
dialog.setResizable(true);
dialog.setVisible(true);
}
use of javax.swing.JDialog in project vcell by virtualcell.
the class ClientRequestManager method showComparisonResults.
public void showComparisonResults(TopLevelWindowManager requester, XmlTreeDiff diffTree, String baselineDesc, String modifiedDesc) {
TMLPanel comparePanel = new TMLPanel();
comparePanel.setXmlTreeDiff(diffTree);
comparePanel.setBaselineVersionDescription(baselineDesc);
comparePanel.setModifiedVersionDescription(modifiedDesc);
JOptionPane comparePane = new JOptionPane(null, JOptionPane.PLAIN_MESSAGE, 0, null, new Object[] { /*"Apply Changes", */
"Close" });
comparePane.setMessage(comparePanel);
JDialog compareDialog = comparePane.createDialog(requester.getComponent(), "Compare Models");
compareDialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
compareDialog.setResizable(true);
compareDialog.pack();
compareDialog.setVisible(true);
// ZEnforcer.showModalDialogOnTop(compareDialog,JOptionPane.getFrameForComponent(requester.getComponent()));
if ("Apply Changes".equals(comparePane.getValue())) {
if (!comparePanel.tagsResolved()) {
DialogUtils.showErrorDialog(comparePanel, "Please resolve all tagged elements/attributes before proceeding.");
} else {
BeanUtils.setCursorThroughout((Container) requester.getComponent(), Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
try {
processComparisonResult(comparePanel, requester);
} catch (RuntimeException e) {
throw e;
} finally {
BeanUtils.setCursorThroughout((Container) requester.getComponent(), Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
}
}
}
}
use of javax.swing.JDialog in project vcell by virtualcell.
the class DatabaseWindowManager method showAccessPermissionDialog.
/**
* Insert the method's description here.
* Creation date: (5/14/2004 6:11:35 PM)
*/
private Object showAccessPermissionDialog(final JComponent aclEditor, final Component requester) {
JOptionPane accessPermissionDialog = new JOptionPane(null, JOptionPane.PLAIN_MESSAGE, 0, null, new Object[] { "OK", "Cancel" });
aclEditor.setPreferredSize(new java.awt.Dimension(300, 350));
accessPermissionDialog.setMessage("");
accessPermissionDialog.setMessage(aclEditor);
accessPermissionDialog.setValue(null);
JDialog d = accessPermissionDialog.createDialog(requester, "Changing Permissions");
d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
DialogUtils.showModalJDialogOnTop(d, requester);
return accessPermissionDialog.getValue();
}
use of javax.swing.JDialog in project vcell by virtualcell.
the class DatabaseWindowManager method showSaveDialog.
/**
* Insert the method's description here.
* Creation date: (5/14/2004 6:11:35 PM)
*/
public String showSaveDialog(final VCDocumentType documentType, final Component requester, final String oldName) throws Exception {
JOptionPane saveDialog = new JOptionPane(null, JOptionPane.PLAIN_MESSAGE, 0, null, new Object[] { "Save", "Cancel" });
saveDialog.setWantsInput(true);
saveDialog.setInitialSelectionValue(oldName);
JPanel panel = new JPanel(new BorderLayout());
JComponent tree = null;
switch(documentType) {
case BIOMODEL_DOC:
{
tree = getBioModelDbTreePanel();
break;
}
case MATHMODEL_DOC:
{
tree = getMathModelDbTreePanel();
break;
}
case GEOMETRY_DOC:
{
tree = getGeometryTreePanel();
break;
}
default:
{
throw new RuntimeException("DatabaseWindowManager.showSaveDialog() - unknown document type");
}
}
tree.setPreferredSize(new java.awt.Dimension(405, 600));
panel.add(tree, BorderLayout.CENTER);
panel.add(new JLabel("Please type a new name:"), BorderLayout.SOUTH);
saveDialog.setMessage("");
saveDialog.setMessage(panel);
JDialog d = saveDialog.createDialog(requester, "Save document:");
d.setResizable(true);
d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
final JOptionPane finalSaveDialog = saveDialog;
ActionListener al = new ActionListener() {
public void actionPerformed(ActionEvent ae) {
finalSaveDialog.selectInitialValue();
}
};
final Timer getFocus = new Timer(100, al);
getFocus.setRepeats(false);
getFocus.start();
DialogUtils.showModalJDialogOnTop(d, requester);
if ("Save".equals(saveDialog.getValue())) {
return saveDialog.getInputValue() == null ? null : saveDialog.getInputValue().toString();
} else {
// user cancelled
throw UserCancelException.CANCEL_NEW_NAME;
}
}
use of javax.swing.JDialog in project vcell by virtualcell.
the class TestingFrameworkWindowManager method showAddTestSuiteDialog.
/**
* Insert the method's description here.
* Creation date: (5/14/2004 6:11:35 PM)
*/
private Object showAddTestSuiteDialog(JComponent addTSPanel, Component requester, String duplicateTestSuiteName) {
addTSPanel.setPreferredSize(new java.awt.Dimension(350, 250));
getAddTestSuiteDialog().setMessage("");
getAddTestSuiteDialog().setMessage(addTSPanel);
getAddTestSuiteDialog().setValue(null);
JDialog d = getAddTestSuiteDialog().createDialog(requester, (duplicateTestSuiteName != null ? "Duplicate TestSuite '" + duplicateTestSuiteName + "'" : "New TestSuite"));
d.setResizable(true);
d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
d.setVisible(true);
return getAddTestSuiteDialog().getValue();
}
Aggregations