// the banner gets a curve along with the new tab style
// TODO create a dedicated preference for this
setBannerCurve(PrefUtil.getAPIPreferenceStore().getBoolean(
IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS));
CacheWrapper coolbarCacheWrapper = new CacheWrapper(topBar);
final Control coolBar = createCoolBarControl(coolbarCacheWrapper
.getControl());
// need to resize the shell, not just the coolbar's immediate
// parent, if the coolbar wants to grow or shrink
coolBar.addListener(SWT.Resize, new Listener() {
public void handleEvent(Event event) {
// If the user is dragging the sash then we will need to force
// a resize. However, if the coolbar was resized programatically
// then everything is already layed out correctly. There is no
// direct way to tell the difference between these cases,
// however
// we take advantage of the fact that dragging the sash does not
// change the size of the shell, and only force another layout
// if the shell size is unchanged.
Rectangle clientArea = shell.getClientArea();
if (lastShellSize.x == clientArea.width
&& lastShellSize.y == clientArea.height) {
LayoutUtil.resize(coolBar);
}
lastShellSize.x = clientArea.width;
lastShellSize.y = clientArea.height;
}
});
if (getWindowConfigurer().getShowCoolBar()) {
topBar.setLeft(coolbarCacheWrapper.getControl());
}
createStatusLine(shell);
fastViewBar = new FastViewBar(this);