views:

6

answers:

0

I have an application that starts out as an Eclipse RCP application and then fires up a JFace ApplicationWindow, complete with a simple menu, toolbar, display widgets, etc.

This second application window includes some model dialogs (extended from JFace Dialog and TitleAreaDialog) from the action classes.

This second application window also fires up a custom JFrame on which I drop a number of other Swing-based custom written JComponents. This third (JFrame) window also includes a simple menu and a toolbar.

All works very well, except....

From my JFrame menu actions (which extend Swing AbstractAction), I would like to call some of the JFace-based dialogs from the ApplicationWindow. I can do that as follows (in the AbstractAction.actionPerformed() method):

        final Display display = Display.getDefault();
        display.asyncExec(new Runnable() {
            public void run() {
                TitleAreaDialogBase dlog = new DisplayPropertiesDialog(display.getActiveShell(),
                    getWindow().getRuntimeProperties());
                if (dlog.open() == Window.OK) {
                    // deal with dialog action
                }
            }
        });

The dialogs appear, but behind my large JFrame window.... I would like to pop/display these JFace-based dialogs in front of my JFrame window.

Any ideas?

Can I wrap the contents of these JFace-based dialogs in a JOptionPane or some such?