Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Is it possible to retrieve MPart's bounds?
Is it possible to retrieve MPart's bounds? [message #1211361] Tue, 26 November 2013 11:53 Go to next message
Alex Kipling is currently offline Alex Kipling
Messages: 257
Registered: July 2012
Senior Member
I would like t oretrieve MPart's bounds.

I found, that Mpart part.getWidget() returns a PartRenderer.
It doesn't seem to have any infos about position or size of the part.

So where is this information saved?
Re: Is it possible to retrieve MPart's bounds? [message #1211396 is a reply to message #1211361] Tue, 26 November 2013 12:13 Go to previous messageGo to next message
Andrzej Szczepanski is currently offline Andrzej Szczepanski
Messages: 16
Registered: May 2013
Junior Member
For SWT based application, this may work:
mPart.getContext().get(Composite.class).getBounds()
Re: Is it possible to retrieve MPart's bounds? [message #1216422 is a reply to message #1211396] Thu, 28 November 2013 13:19 Go to previous messageGo to next message
Alex Kipling is currently offline Alex Kipling
Messages: 257
Registered: July 2012
Senior Member
Embarrassed
Ah thnx, of course...
Re: Is it possible to retrieve MPart's bounds? [message #1221046 is a reply to message #1216422] Mon, 16 December 2013 19:06 Go to previous message
Eric Moffatt is currently offline Eric Moffatt
Messages: 118
Registered: July 2009
Senior Member

When using the SWT renderers the getWidget() method usually returns an SWT 'Control'. The exception is that MPartSashContainers nested within outer sash containers return a Rectangle. If you need the control here you have to walk up the MPSC's through the 'getParent' call until you get one that returns an SWT control.
Previous Topic:Eclipse 4 application model strategies
Next Topic:MMenuItem.setSelected is not reflected in the GUI
Goto Forum:
  


Current Time: Sat Oct 25 22:58:50 GMT 2014

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

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