Skip to main content


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 08:01 Go to next message
Henno Vermeulen is currently offline Henno VermeulenFriend
Messages: 126
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 09:22 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
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 15:00 Go to previous message
Henno Vermeulen is currently offline Henno VermeulenFriend
Messages: 126
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:Cell navigation
Goto Forum:
  


Current Time: Wed Apr 24 18:18:31 GMT 2024

Powered by FUDForum. Page generated in 0.02785 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top