How to make the workbench requery view sizes? [message #486620] |
Fri, 18 September 2009 13:00 |
bjoern 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
|
|
|
Powered by
FUDForum. Page generated in 0.12243 seconds