public static JDialog buildStudyWizardDialog( AddisWindow mainWindow, String title, AddStudyWizardPresentation pm) { JDialog dialog = new JDialog(mainWindow, title, true); AddStudyWizard wizard = new AddStudyWizard(pm, mainWindow, dialog); dialog.getContentPane().add(wizard); dialog.setMinimumSize(new Dimension(700, 550)); dialog.setPreferredSize(AddisWindow.fitDimensionToScreen(790, 750)); dialog.pack(); WizardFrameCloser.bind(wizard, dialog); Main.bindPrintScreen(wizard); return dialog; }
public AddDosedDrugTreatmentWizard( final TreatmentCategorizationWizardPresentation pm, final JDialog dialog) { super(buildModel(pm, dialog)); final AddisWindow mainWindow = Main.getMainWindow(); addWizardListener( new WizardListener() { @Override public void wizardClosed(final WizardEvent e) { mainWindow.leftTreeFocus(pm.commit()); } @Override public void wizardCancelled(final WizardEvent e) {} }); setDefaultExitMode(Wizard.EXIT_ON_FINISH); }
public JDialog getAddDialog(AddisWindow mainWindow, Domain domain, ValueModel selectionModel) { JDialog dialog = new JDialog(mainWindow, "Create DerSimonian-Laird random effects meta-analysis", true); Wizard wizard = new PairwiseMetaAnalysisWizard( mainWindow, new PairWiseMetaAnalysisWizardPresentation( domain, mainWindow.getPresentationModelFactory())); dialog.getContentPane().add(wizard); dialog.setMinimumSize(new Dimension(700, 550)); dialog.setPreferredSize(AddisWindow.fitDimensionToScreen(790, 650)); dialog.pack(); WizardFrameCloser.bind(wizard, dialog); Main.bindPrintScreen(wizard); return dialog; }