Search in sources :

Example 86 with JDialog

use of javax.swing.JDialog in project vcell by virtualcell.

the class TestingFrameworkWindowManager method showEditTestCriteriaDialog.

/**
 * Insert the method's description here.
 * Creation date: (5/14/2004 6:11:35 PM)
 */
@SuppressWarnings("deprecation")
private Object showEditTestCriteriaDialog(JComponent editTCrPanel, Component requester) {
    editTCrPanel.setPreferredSize(new java.awt.Dimension(400, 300));
    getEditTestCriteriaDialog().setMessage("");
    getEditTestCriteriaDialog().setMessage(editTCrPanel);
    getEditTestCriteriaDialog().setValue(null);
    JDialog d = getEditTestCriteriaDialog().createDialog(requester, "Edit Test Criteria:");
    d.setResizable(true);
    d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    DialogUtils.showModalJDialogOnTop(d, requester);
    return getEditTestCriteriaDialog().getValue();
}
Also used : Dimension(java.awt.Dimension) JDialog(javax.swing.JDialog)

Example 87 with JDialog

use of javax.swing.JDialog in project vcell by virtualcell.

the class TestingFrameworkWindowManager method showAddTestCaseDialog.

/**
 * Insert the method's description here.
 * Creation date: (5/14/2004 6:11:35 PM)
 */
private Object showAddTestCaseDialog(JComponent addTCPanel, Component requester) {
    addTCPanel.setPreferredSize(new java.awt.Dimension(600, 200));
    getAddTestCaseDialog().setMessage("");
    getAddTestCaseDialog().setMessage(addTCPanel);
    getAddTestCaseDialog().setValue(null);
    JDialog d = getAddTestCaseDialog().createDialog(requester, "New TestCase:");
    d.setResizable(true);
    d.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    d.setVisible(true);
    return getAddTestCaseDialog().getValue();
}
Also used : Dimension(java.awt.Dimension) JDialog(javax.swing.JDialog)

Example 88 with JDialog

use of javax.swing.JDialog in project vcell by virtualcell.

the class PathwayImportPanel method showDialog.

public void showDialog(JComponent parent, PathwayImportOption pathwayImportOption) {
    currentOption = pathwayImportOption;
    choosePathwayCardLayout.show(choosePathwayPanel, currentOption.name());
    Container owner = parent.getTopLevelAncestor();
    String title = "Select Pathway";
    boolean modal = true;
    dialog = owner instanceof Frame ? new JDialog((Frame) owner, title, modal) : owner instanceof Dialog ? new JDialog((Dialog) owner, title, modal) : new JDialog((Frame) null, title, modal);
    dialog.add(this);
    dialog.pack();
    dialog.setLocationRelativeTo(owner);
    dialog.setVisible(true);
}
Also used : Container(java.awt.Container) Frame(java.awt.Frame) JDialog(javax.swing.JDialog) Dialog(java.awt.Dialog) JDialog(javax.swing.JDialog)

Example 89 with JDialog

use of javax.swing.JDialog in project vcell by virtualcell.

the class ElectricalStimulusPanel method graphTimeFunction.

public static void graphTimeFunction(Component owner, Expression expr, SymbolTable symbolTable, ReservedSymbol timeSymbol, String title) {
    final TimeFunctionPanel timeFunctionPanel = new TimeFunctionPanel();
    try {
        timeFunctionPanel.setTimeFunction(getProtocolParameterExprPreview(expr, symbolTable, timeSymbol).flatten().infix());
    } catch (Exception e) {
        e.printStackTrace();
        DialogUtils.showErrorDialog(owner, "For plot preview only simple expressions of time are allowed.", e);
        return;
    }
    JDialog jdialog = new JDialog(JOptionPane.getFrameForComponent(owner), true);
    jdialog.setTitle(title);
    jdialog.setContentPane(timeFunctionPanel);
    jdialog.pack();
    BeanUtils.centerOnComponent(jdialog, owner);
    DialogUtils.showModalJDialogOnTop(jdialog, owner);
}
Also used : TimeFunctionPanel(cbit.plot.gui.TimeFunctionPanel) ExpressionException(cbit.vcell.parser.ExpressionException) JDialog(javax.swing.JDialog)

Example 90 with JDialog

use of javax.swing.JDialog in project processdash by dtuma.

the class WBSEditor method save.

private boolean save() {
    if (readOnly)
        return true;
    // finish all editing sessions in progress
    stopAllCellEditingSessions();
    if (maybeSaveTeamMemberList() == false)
        return false;
    JDialog dialog = createWaitDialog(frame, "Saving Data...");
    SaveThread saver = new SaveThread(dialog);
    saver.start();
    dialog.setVisible(true);
    setDirty(!saver.saveResult);
    return saver.saveResult;
}
Also used : 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