Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Adding top and bottom banners
Adding top and bottom banners [message #1740127] Tue, 09 August 2016 13:43
Jason Trinidad is currently offline Jason TrinidadFriend
Messages: 3
Registered: August 2016
Junior Member
Hi, all.

I have an RCP application developed in Helios, but now we have migrated to Luna. The application used to have a banner (Composite) with a label inside of it at the very top and bottom of the app.

http://i.imgur.com/8ba4fdV.png

I had this function inside my ApplicationWorkbenchWindowAdvisor class

public void createWindowContents(Shell shell)
	{
		GridLayout gl;
		GridData gd;
		IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
		shell.setLayout(new GridLayout(1, false));
		String defaultBanner = String.valueOf(SystemDAO.getDefaultBannerClassification(SystemDAO.MAIN_ROW_ID));
		
		//top banner
		topBanner = new Composite(shell, 0);
		topBanner.setBackground(Display.getDefault().getSystemColor(labelBackgroundColor));
		gd=new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_BEGINNING, true, false);
		gd.heightHint=12;
		topBanner.setLayoutData(gd);
		gl=new GridLayout();
		gl.marginTop=0;
		gl.marginWidth=0;
		topBanner.setLayout(gl);

		//top label
		topLabel=new Label(topBanner,SWT.None);
		topLabel.setBackground(Display.getDefault().getSystemColor(labelBackgroundColor));
		topLabel.setText(defaultBanner);
		topLabel.setLayoutData(new GridData(SWT.CENTER,SWT.BOTTOM,true,false));

		//bottom banner
		bottomBanner = new Composite(shell, 0);        
		bottomBanner.setBackground(Display.getDefault().getSystemColor(labelBackgroundColor));        
		gd=new GridData(GridData.HORIZONTAL_ALIGN_FILL, GridData.VERTICAL_ALIGN_END, true, false);
		gd.heightHint=12;
		bottomBanner.setLayoutData(gd);
		gl=new GridLayout();gl.marginTop=-6;
		bottomBanner.setLayout(gl);

		//bottom label
		bottomLabel=new Label(bottomBanner,SWT.None);
		bottomLabel.setBackground(Display.getDefault().getSystemColor(labelBackgroundColor));
		bottomLabel.setText(defaultBanner);
		bottomLabel.setLayoutData(new GridData(SWT.CENTER,SWT.BOTTOM,true,false));

	}


But this isn't working after the upgrade. I tried adding that code to my preWindowOpen and postWindowOpen but this didn't make any difference. Where am I supposed to add this code? Thank you.
Previous Topic:[SOLVED] Where are the additional plugin dependencies coming from?
Next Topic:PDE builds for windows 64 bit
Goto Forum:
  


Current Time: Thu Apr 25 00:19:05 GMT 2024

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

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

Back to the top