Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » initModality in PartDescriptor (for new window)
initModality in PartDescriptor (for new window) [message #1698031] Wed, 10 June 2015 13:39 Go to next message
Bartlomiej Cichocki is currently offline Bartlomiej CichockiFriend
Messages: 23
Registered: April 2015
Junior Member
Hello,
If I create partDescriptor with:
@Inject
private Stage stage;

@PostConstruct
public void postConstruct()
{
 stage.initModality( Modality.APPLICATION_MODAL );
}
everything works.

But I want to have one partDescriptor and set modality "on the fly".
How can I do that?

It must be set before part set visible, but MPart.getObject() Quote:
It will only be non-null if the element has been rendered into the presentation
, so I can't set it after that.
Re: initModality in PartDescriptor (for new window) [message #1698038 is a reply to message #1698031] Wed, 10 June 2015 13:57 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

You can not modify the modality once a stage is shown. So you need to
make this decision at startup!

Tom

On 10.06.15 15:39, Bart Cichy wrote:
> Hello,
> If I create partDescriptor with:
> @Inject
> private Stage stage;
>
> @PostConstruct
> public void postConstruct()
> {
> stage.initModality( Modality.APPLICATION_MODAL );
> }
> everything works.
>
> But I want to have one partDescriptor and set modality "on the fly".
> How can I do that?
>
> It must be set before part set visible, but MPart.getObject() Quote:
>> It will only be non-null if the element has been rendered into the
>> presentation
> , so I can't set it after that.
Re: initModality in PartDescriptor (for new window) [message #1698064 is a reply to message #1698031] Wed, 10 June 2015 18:19 Go to previous messageGo to next message
Bartlomiej Cichocki is currently offline Bartlomiej CichockiFriend
Messages: 23
Registered: April 2015
Junior Member
Yes, I known it. But I want to have one partDescriptor and before send to renderer (set visible) I want to programmatically set Modality.WINDOW_MODAL / Modality.APPLICATION_MODAL. Can I do it somehow on the fly with one partDescriptor or I must set second partDescriptor with this setting?
Re: initModality in PartDescriptor (for new window) [message #1698065 is a reply to message #1698064] Wed, 10 June 2015 18:39 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I repeat this makes no real sense! If you want a window to be modal use set the appropriate state in the model - see http://wiki.eclipse.org/Efxclipse/Runtime/e4#MWindow
Re: initModality in PartDescriptor (for new window) [message #1698068 is a reply to message #1698031] Wed, 10 June 2015 18:55 Go to previous messageGo to next message
Bartlomiej Cichocki is currently offline Bartlomiej CichockiFriend
Messages: 23
Registered: April 2015
Junior Member
But I don't see any state to modal:
- scene.3d
- decoration
- StageStyle
- fullscreen
- shellMaximized (tag)

[Updated on: Wed, 10 June 2015 18:57]

Report message to a moderator

Re: initModality in PartDescriptor (for new window) [message #1698096 is a reply to message #1698068] Thu, 11 June 2015 08:10 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You are right! Please file a bugzilla so that we allow to control the
modality as well.

Tom

On 10.06.15 20:55, Bartlomiej Cichocki wrote:
> But I don't see any state to modal:
> - scene.3d
> - decoration
> - StageStyle
> - fullscreen
> - shellMaximized
Re: initModality in PartDescriptor (for new window) [message #1698106 is a reply to message #1698096] Thu, 11 June 2015 10:49 Go to previous messageGo to next message
Bartlomiej Cichocki is currently offline Bartlomiej CichockiFriend
Messages: 23
Registered: April 2015
Junior Member
bug 469920
Re: initModality in PartDescriptor (for new window) [message #1698227 is a reply to message #1698106] Fri, 12 June 2015 11:08 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
https://wiki.eclipse.org/Efxclipse/Runtime/e4#MWindow

Tom

On 11.06.15 12:49, Bartlomiej Cichocki wrote:
> bug 469920
Previous Topic:@PreClose in PartDescriptor
Next Topic:Howto pass parameter to contribution class
Goto Forum:
  


Current Time: Fri Apr 19 02:53:48 GMT 2024

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

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

Back to the top