// Keep in mind when upgrading Scope to the newer versions.
// Make a JDialog to contain the view.
Window parentWindow = getDefaultParentWindow();
final CayenneDialog dialog;
if (parentWindow instanceof Dialog) {
dialog = new CayenneDialog((Dialog) parentWindow);
}
else {
dialog = new CayenneDialog((Frame) parentWindow);
}
// Set title, modality, resizability
if (inView.getTitle() != null) {
dialog.setTitle(inView.getTitle());
}
if (inView.getDisplayMode() == SwingView.MODAL_DIALOG) {
dialog.setModal(true);
}
else {
dialog.setModal(false);
}
dialog.setResizable(inView.isResizable());
setupWindow(dialog.getRootPane(), inView, true);
dialog.toFront();
}