private JDialog createDialog(String title) { JDialog dlg = null; Presenter currentPst = AWWindowsManager.instance().getCurrentPst(); // boolean thrower = (currentPst!=null && // currentPst.getClass().getSimpleName().equals("AbrirDocumentoPst")); // if (thrower){ // dlg = new JDialog(null, title, Dialog.ModalityType.MODELESS); // }else if (AWWindowsManager.instance().isInMainWindow() || (currentPst == null)) { dlg = new JDialog( AWWindowsManager.instance().getFrame(), title, Dialog.ModalityType.DOCUMENT_MODAL); } else { JDialog parent = (JDialog) ((View) currentPst.getView()).getParentContainer(); dlg = new JDialog(parent, title, Dialog.ModalityType.DOCUMENT_MODAL); } setupIcons(dlg); dlg.setUndecorated(true); dlg.getContentPane().setLayout(new BorderLayout()); installFestFixture(dlg); // installMouseAdapter(dlg); return dlg; }