Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » GEF » Get the size of my plugin's view
Get the size of my plugin's view [message #235229] Thu, 07 June 2007 09:14 Go to next message
Eclipse UserFriend
Originally posted by: malnatij.lu.unisi.ch

Hi, given that every view can be dynamically resized by the user, I would like to know how to get it's size (the x axis is enough).

Any idea?

Thanks
Re: Get the size of my plugin's view [message #235277 is a reply to message #235229] Fri, 08 June 2007 01:31 Go to previous messageGo to next message
Alex Boyko is currently offline Alex BoykoFriend
Messages: 200
Registered: July 2009
Senior Member
Hi,

You probably need to get the size of the control that the view uses. There
is a getBounds() method on the control that would give you its size in
pixels.

Cheers,
Alex
Re: Get the size of my plugin's view [message #237558 is a reply to message #235277] Sun, 05 August 2007 19:08 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: malnatij.lu.unisi.ch

Hi, I didn't focus on this problem till now, and I'm still wondering how to solve it.

You suggested to get the bounds of the controller, but I don't see any way to get this "controller"... any idea?

I just need to know the actual size of the view that my plug-in creates


thanks :))
Re: Get the size of my plugin's view [message #237583 is a reply to message #237558] Mon, 06 August 2007 06:46 Go to previous messageGo to next message
Manuel Selva is currently offline Manuel SelvaFriend
Messages: 189
Registered: July 2009
Location: Grenoble, France
Senior Member
Hi,

You shouldn't look for a "contoller" but a Control (an SWT class). Your
view's content is created on a Composite (given to you as a parameter of
the createPartCOntrol method). You just should keep a reference on this
SWT Composite object and asks it when you need : getBounds().

Hope this can help

Manuel


Re: Get the size of my plugin's view [message #237615 is a reply to message #237583] Mon, 06 August 2007 12:56 Go to previous message
Eclipse UserFriend
Originally posted by: malnatij.lu.unisi.ch

Thanks, I did it :) cool
Previous Topic:Using retarget actions from a GEF editor
Next Topic:What should a paste action derive from? (triggering calculateEnabled())
Goto Forum:
  


Current Time: Sat Apr 20 11:29:51 GMT 2024

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

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

Back to the top