|Re: Creating multiple Display objects [message #518982 is a reply to message #518622]
||Fri, 05 March 2010 10:58
| Grant Gayed
Registered: July 2009
Creating multiple Displays is not supported on Linux and OS X, so this is
probably not what you want to do.
Currently the only way to provide user notification in the task bar is the
approach that you've tried. If this does not work for your case then I
would suggest logging an enhancement request with swt for specific API to
provide task bar notification (
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=Platform &component=SWT&bug_severity=enhancement )
.. I'm surprised that I couldn't find one already, because this has been
asked before. Actually, would it make any sense in your context to instead
put an icon in the system tray and have it give notification balloons (maybe
not)? To give this a try see
http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org. eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet225 .java .
Regarding your wizard, presumably it's like this because its Shell is
created as a child of the main Shell. If its Shell was instead created with
no parent then it should not block the main window like this. Are you
creating the wizard's Shell (or at least able to specify its parent Shell),
or is it completely done for you by the framework? If it's coming from the
framework then a wizard may not be the right thing to use here. Now that I
think of it, wizards are usually blocking by their nature. Could you just
create a Shell with your content instead?
"Paul Webster" <firstname.lastname@example.org> wrote in message
> I've re-directed this to the SWT newsgroup.
> Ricky Patel wrote:
> > Hello everyone :)
> > So I'm a few versions back on Eclipse (3.4) and am currently working on
> > getting to 3.6 so if I'm a bit outdated, I'm very sorry but after doing
> > research I'm sure these issues still come up.
> > So before I get into the solution, it's best to know the problem. In my
> > scenario I am creating an instant messenger type program where there is
> > a buddy list window and multiple chat windows. Overall this is currently
> > all written in one perspective mainly using views.
> > The first issue is implementing the windows, mac and linux ability to
> > notify a user when the window isn't in view. In OSX this would be the
> > icon jumping up and down on the dock, windows a blinking icon and linux
> > the same as windows. Overall I still have yet to figure out a solution
> > for this. Shell.forceActive was a suggestion to solve this but overall
> > didn't work because if you were typing to user1, and then user2 sent you
> > a message, user2's window would steal focus.
> > The second issue is dialogs. If I want to add a new user to my buddy
> > list I've created a wizard to help the user do this. But since all the
> > windows are on the same display, the wizard dialog restricts access to
> > all chat windows until the dialog is disposed of.
> > The solution I've thought up is creating multiple Display objects for a
> > single Program. If each chat window was in its own Display then both my
> > problems are mitigated since both act upon the current display.
> > Does anyone know how to create multiple Displays for a single RCP app?
> > Attempting to call Display d = new Display () will result in an
> > org.eclipse.swt.SWTException: Invalid thread access. If not anyone have
> > a solution for me that I maybe outdated on? This is an highly run
> > use-case for me and I would love a solution...
> Paul Webster
Powered by FUDForum
. Page generated in 0.03209 seconds