|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2011 Frank Appel and others. |
2 |
* Copyright (c) 2011, 2012 Frank Appel and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 31-36
Link Here
|
| 31 |
} |
31 |
} |
| 32 |
|
32 |
|
| 33 |
private void forceShellRecalculations( Shell shell ) { |
33 |
private void forceShellRecalculations( Shell shell ) { |
|
|
34 |
boolean isPacked = ControlUtil.getControlAdapter( shell ).isPacked(); |
| 34 |
Rectangle boundsBuffer = shell.getBounds(); |
35 |
Rectangle boundsBuffer = shell.getBounds(); |
| 35 |
bufferScrolledCompositeOrigins( shell ); |
36 |
bufferScrolledCompositeOrigins( shell ); |
| 36 |
clearLayoutBuffers( shell ); |
37 |
clearLayoutBuffers( shell ); |
|
Lines 39-45
Link Here
|
| 39 |
rePack( shell ); |
40 |
rePack( shell ); |
| 40 |
enlargeScrolledCompositeContent( shell ); |
41 |
enlargeScrolledCompositeContent( shell ); |
| 41 |
clearLayoutBuffers( shell ); |
42 |
clearLayoutBuffers( shell ); |
| 42 |
restoreShellSize( shell, boundsBuffer ); |
43 |
restoreShellSize( shell, boundsBuffer, isPacked ); |
| 43 |
restoreScrolledCompositeOrigins( shell ); |
44 |
restoreScrolledCompositeOrigins( shell ); |
| 44 |
} |
45 |
} |
| 45 |
|
46 |
|
|
Lines 67-74
Link Here
|
| 67 |
WidgetTreeVisitor.accept( shell, new RestoreScrolledCompositeOriginsVisitor() ); |
68 |
WidgetTreeVisitor.accept( shell, new RestoreScrolledCompositeOriginsVisitor() ); |
| 68 |
} |
69 |
} |
| 69 |
|
70 |
|
| 70 |
private void restoreShellSize( Shell shell, Rectangle bufferedBounds ) { |
71 |
private void restoreShellSize( Shell shell, Rectangle bufferedBounds, boolean isPacked ) { |
| 71 |
setShellSize( shell, bufferedBounds ); |
72 |
if( isPacked ) { |
|
|
73 |
shell.pack(); |
| 74 |
} else { |
| 75 |
setShellSize( shell, bufferedBounds ); |
| 76 |
} |
| 72 |
} |
77 |
} |
| 73 |
|
78 |
|
| 74 |
private void enlargeShell( Shell shell ) { |
79 |
private void enlargeShell( Shell shell ) { |