Results 1 to 4 of 4
  1. #1
    Drun's Avatar
    Drun is offline Member
    Join Date
    Nov 2009
    Location
    Indian Head, MD (Missing Pittsburgh PA)
    Posts
    44
    Rep Power
    0

    Default 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

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    25

    Default

    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.

  3. #3
    Drun's Avatar
    Drun is offline Member
    Join Date
    Nov 2009
    Location
    Indian Head, MD (Missing Pittsburgh PA)
    Posts
    44
    Rep Power
    0

    Default

    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

  4. #4
    Drun's Avatar
    Drun is offline Member
    Join Date
    Nov 2009
    Location
    Indian Head, MD (Missing Pittsburgh PA)
    Posts
    44
    Rep Power
    0

    Default

    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

  1. Default Focus in JOptionPane Dialog
    By Gajesh Tripathi in forum AWT / Swing
    Replies: 5
    Last Post: 11-11-2009, 02:59 PM
  2. Default Focus in JOptionPane Dialog
    By Gajesh Tripathi in forum AWT / Swing
    Replies: 1
    Last Post: 11-09-2009, 12:15 PM
  3. how to get the full file name
    By priyanka3006 in forum JDBC
    Replies: 0
    Last Post: 08-05-2009, 12:55 PM
  4. Full screen test
    By Java Tip in forum java.awt
    Replies: 0
    Last Post: 06-23-2008, 11:24 PM
  5. Full screen
    By Jack in forum Advanced Java
    Replies: 2
    Last Post: 07-02-2007, 05:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •