customize workbench look&feel [message #458815] |
Sun, 26 November 2006 00:41 |
Eclipse User |
|
|
|
Originally posted by: tino.langer.gmx.net
Hello,
I want to draw a image in den top of the workbench (as a additional
braqnding). As I read in this group, I have to reimplement the function
createWindowContents of the Class WorkbenchWindowAdvisor - is this the
right way? - I did it as described at the end of the posting.
First it seems to work, but than I saw, that the perspective chooser is
missing and the progressbar in the statusline isn't visible.
Does anyone know which is the right way to brand my application with a
image below the menubar?
many thanks - Tino
public void createWindowContents(Shell shell) {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
Menu menuBar = configurer.createMenuBar();
shell.setMenuBar(menuBar);
GridLayout shellLayout = new GridLayout();
shellLayout.marginWidth = 0;
shellLayout.marginHeight = 0;
shellLayout.verticalSpacing = 0;
shell.setLayout(shellLayout);
// At this position I added a composite //
if (!"carbon".equals(SWT.getPlatform())) { //$NON-NLS-1$
Label sep1 = new Label(shell, SWT.SEPARATOR |
SWT.HORIZONTAL);
sep1.setLayoutData(new GridData(GridData.FILL,
GridData.CENTER, true, false));
}
Control coolBar = configurer.createCoolBarControl(shell); //
coolBar.setLayoutData(new GridData(GridData.FILL,
GridData.CENTER, true, false));
Label sep2 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
sep2.setLayoutData(new GridData(GridData.FILL,
GridData.CENTER, true, false));
Control pageComposite = configurer.createPageComposite(shell);
pageComposite.setLayoutData(new GridData(GridData.FILL,
GridData.FILL, true, true));
Label sep3 = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
sep3.setLayoutData(new GridData(GridData.FILL,
GridData.CENTER, true, false));
Control statusLine = configurer.createStatusLineControl(shell);
statusLine.setLayoutData(new GridData(GridData.FILL,
GridData.CENTER, true, false));
shell.layout(true);
}
|
|
|
Powered by
FUDForum. Page generated in 0.02808 seconds