Search in sources :

Example 81 with JDialog

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);
}
Also used : CopasiOptimizationMethodType(cbit.vcell.opt.CopasiOptimizationMethod.CopasiOptimizationMethodType) JOptionPane(javax.swing.JOptionPane) JDialog(javax.swing.JDialog)

Example 82 with JDialog

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));
            }
        }
    }
}
Also used : TMLPanel(cbit.xml.merge.gui.TMLPanel) JOptionPane(javax.swing.JOptionPane) JDialog(javax.swing.JDialog)

Example 83 with JDialog

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();
}
Also used : JOptionPane(javax.swing.JOptionPane) JDialog(javax.swing.JDialog)

Example 84 with JDialog

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;
    }
}
Also used : JPanel(javax.swing.JPanel) BorderLayout(java.awt.BorderLayout) ActionListener(java.awt.event.ActionListener) Timer(javax.swing.Timer) ActionEvent(java.awt.event.ActionEvent) JComponent(javax.swing.JComponent) JLabel(javax.swing.JLabel) JOptionPane(javax.swing.JOptionPane) JDialog(javax.swing.JDialog)

Example 85 with JDialog

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();
}
Also used : Dimension(java.awt.Dimension) JDialog(javax.swing.JDialog)

Aggregations

JDialog (javax.swing.JDialog)181 JButton (javax.swing.JButton)70 JPanel (javax.swing.JPanel)61 ActionEvent (java.awt.event.ActionEvent)51 ActionListener (java.awt.event.ActionListener)39 JLabel (javax.swing.JLabel)39 JOptionPane (javax.swing.JOptionPane)34 BorderLayout (java.awt.BorderLayout)30 Dimension (java.awt.Dimension)27 JScrollPane (javax.swing.JScrollPane)27 JFrame (javax.swing.JFrame)23 BoxLayout (javax.swing.BoxLayout)21 FlowLayout (java.awt.FlowLayout)19 JCheckBox (javax.swing.JCheckBox)15 AbstractAction (javax.swing.AbstractAction)14 WindowEvent (java.awt.event.WindowEvent)13 JComponent (javax.swing.JComponent)12 ButtonBarBuilder (com.jgoodies.forms.builder.ButtonBarBuilder)11 WindowAdapter (java.awt.event.WindowAdapter)11 IOException (java.io.IOException)10