Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to make the workbench requery view sizes?
How to make the workbench requery view sizes? [message #486620] Fri, 18 September 2009 13:00
bjoern is currently offline bjoernFriend
Messages: 19
Registered: July 2009
Junior Member
Hello everybody,
I have a view that contains a UI Form Section which is collapsed in the
first place. I would like to match the view's heigt with the one of the
Section on it. That's why I implemented ISizeProvider on the view as
follows:

------------------------------------------------------------ -
@Override
public int computePreferredSize(boolean width, int availableParallel,
int availablePerpendicular, int preferredResult) {
if (width)
return preferredResult;
else
return section.getSize().y;
}

@Override
public int getSizeFlags(boolean width) {
return (!width ? SWT.FILL : 0);
}

------------------------------------------------------------ --

Now my problem is that the view size is queried on perspective creaton
time, but not afterwards anymore. Then if the user expands the Section,
its contents will not be shown until the user tries to resize the view's
heigt using the mouse, which leads to a requery of the view's size.

Is it somehow possible to programmatically make the workbench requery
the view sizes and do the layout accordingly? I have found nothing like
IWorkbenchPage#layout() or anything similar :-(

I would be happy for any hints on this, thanks in advance!

Regards,
Björn
Previous Topic:how to call another command in handlerclass of a command
Next Topic:Enable/Disable button in toolbar using commands
Goto Forum:
  


Current Time: Tue Apr 23 09:30:58 GMT 2024

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

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

Back to the top