Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » hide a Dialog without disposing it
hide a Dialog without disposing it [message #630215] Fri, 01 October 2010 04:01 Go to next message
SlowStrider Mising name is currently offline SlowStrider Mising name
Messages: 115
Registered: July 2009
Senior Member
Is it possible to hide a jface dialog without disposing it? I would like it to exist during the entire lifetime of an editor.

I have a dialog which can logically be seen as part of the form in my editor. It is simply only visible to the user when he clicks a button. It is a detail view of a selected master entity; it contains a table whose input I would like to set to a detail observable list of my model.

But when the dialog is disposed the table gets disposed so I lose my binding.
Re: hide a Dialog without disposing it [message #630231 is a reply to message #630215] Fri, 01 October 2010 05:22 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas Schindl
Messages: 5282
Registered: July 2009
Senior Member
get the dialog-shell and call setVisible(false).

Tom

Am 01.10.10 10:01, schrieb SlowStrider:
> Is it possible to hide a jface dialog without disposing it? I would like
> it to exist during the entire lifetime of an editor.
>
> I have a dialog which can logically be seen as part of the form in my
> editor. It is simply only visible to the user when he clicks a button.
> It is a detail view of a selected master entity; it contains a table
> whose input I would like to set to a detail observable list of my model.
>
> But when the dialog is disposed the table gets disposed so I lose my
> binding.
Re: hide a Dialog without disposing it [message #630316 is a reply to message #630231] Fri, 01 October 2010 11:00 Go to previous message
SlowStrider Mising name is currently offline SlowStrider Mising name
Messages: 115
Registered: July 2009
Senior Member
Thank you, works great.

As a related issue: when I do the binding I have to create the contents of the dialog without showing it yet. I solved this by simply calling create() on the dialog instead of open(). If I later do setVisible(true) when the user clicks a button it opens correctly.
Previous Topic:IStructuredSelection not Iterable
Next Topic:DelayedObservableValue with IObservableCollection?
Goto Forum:
  


Current Time: Fri Aug 22 09:43:00 EDT 2014

Powered by FUDForum. Page generated in 0.02100 seconds