Results 1 to 4 of 4
- 12-18-2009, 04:53 PM #1
Makeing a dialog not steal full focus
I have a dialog but I don't want it to prevent the useage of the program that called it, I want the user to be able to still interact with the program even when the dialog box is up. My dialog I am working with inherates from TrayDialog.
Michael P. O'Connor
http://www.mikeoconnor.net
-
Since TrayDialog isn't a core Java class, our help here may be limited. The usual answer to this is to make the dialog non-modal. For JDialogs, there's a setter method, setModal, that is inherited from Dialog that fulfills this purpose. Whether this will work with a TrayDialog-derived class, well I just don't know.
- 12-18-2009, 07:39 PM #3
TrayDialog is from the Eclipse RCP and it inherates from the Eclipse RCP Dialog object (just FYI)
Michael P. O'Connor
http://www.mikeoconnor.net
- 12-18-2009, 07:54 PM #4
Also Thanks for the info, I will admit I never heard of something being "modal" and "non-modal" so I did not even think of using that term in my google searches, but from your post I ended up putting that in and ended up at the anser at this site.
<site removed as appently I can not post links yet. but here is the text from the site
This question would be better asked on the platform newsgroup, since it's not related to JDT at all. Looking at the Dialog class' constructor I see:
protected Dialog(IShellProvider parentShell) {
super(parentShell);
setShellStyle(SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL
| getDefaultOrientation());
setBlockOnOpen(true);
}
I don't know if you can call setShellStyle again in a derived constructor.
kumardi@xxxxxxxxxx wrote:
Hi,
Could anyone please tell me if there is a way to create a non-modal dialog as
part of the org.eclipse.jface.dialogs class ?
I tried looking into help and docs but could'nt find which of the standard dialogs is a
non-modal. If there is none then how do I create a non-modal or modeless dialog that
I want to use in a Java plug-in ?
Thanks,
Dinesh
Again thanks.Michael P. O'Connor
http://www.mikeoconnor.net
Similar Threads
-
Default Focus in JOptionPane Dialog
By Gajesh Tripathi in forum AWT / SwingReplies: 5Last Post: 11-11-2009, 03:59 PM -
Default Focus in JOptionPane Dialog
By Gajesh Tripathi in forum AWT / SwingReplies: 1Last Post: 11-09-2009, 01:15 PM -
how to get the full file name
By priyanka3006 in forum JDBCReplies: 0Last Post: 08-05-2009, 01:55 PM -
Full screen test
By Java Tip in forum java.awtReplies: 0Last Post: 06-24-2008, 12:24 AM -
Full screen
By Jack in forum Advanced JavaReplies: 2Last Post: 07-02-2007, 06:49 AM
Bookmarks