Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [e4-dev] Re-use of View in Dialog

Hi, Remy,

thank you.  Works well (after I had a now-vanished NPE for a while).

Cheers, Lars

2010/3/17 Remy Suen <remysuen@xxxxxxxxxx>:
> On Tue, Mar 16, 2010 at 10:23 PM, Lars Vogel <lars.vogel@xxxxxxxxxxxxxx>
> wrote:
>> Thank Remy, I'll give it a try .
>
> Here is the code which I just tested.
>
> // create a detached window
> MWindow detachedWindow = MApplicationFactory.eINSTANCE.createWindow();
> // attach it to the main/parent window
> parentWindow.getChildren().add(detachedWindow);
>
> // find the part to move
> MPart detailsView = partService.findPart("DetailsView");
> // technically you don't have to remove it because EMF will remove it
> detailsView.getParent().getChildren().remove(detailsView);
> // move the part to the new window
> detachedWindow.getChildren().add(detailsView);
>
> // set a desired size
> detachedWindow.setX(400);
> detachedWindow.setY(300);
>
> Regards,
> Remy
>
> ----------
> Remy Suen
> Eclipse Platform/UI Committer
> IBM Ottawa
> 613-356-5162
> _______________________________________________
> e4-dev mailing list
> e4-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/e4-dev
>
>



-- 
Lars
http://www.vogella.de - Tutorials about Java, Eclipse and Web programming
http://www.twitter.com/vogella - Lars on Twitter


Back to the top