Bug 80203 - [JFace] ApplicationWindow contents are reduced to thin strip when showTopSeperator() returns false
Summary: [JFace] ApplicationWindow contents are reduced to thin strip when showTopSepe...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P4 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords: helpwanted
Depends on:
Blocks:
 
Reported: 2004-12-04 08:06 EST by Mark McLaren CLA
Modified: 2019-09-06 15:30 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Mark McLaren CLA 2004-12-04 08:06:20 EST
If ApplicationWindow.showTopSeperator() returns false, the contents (as 
returned by createContents()) are reduced to a thin strip at the top of the 
shell.  Here's what I mean:


import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;


public class DemonstrateAppWindowTopSeparatorProblem {

	public static void main(String[] args) {
		ApplicationWindow appWindow = new ApplicationWindow(null) {
			protected Control createContents(Composite parent) {
				Composite mainPanel = new Composite(parent, 
SWT.NONE);
				mainPanel.setLayout(new GridLayout(1, true));
				mainPanel.setBackground(new Color
(mainPanel.getDisplay(), 0, 0, 255));
				mainPanel.setLayoutData(new GridData
(GridData.FILL_BOTH));
				return mainPanel;
			}

			protected boolean showTopSeperator() {
				return false;
			}
			
			protected Point getInitialSize() {
				return new Point(400, 300);
			}
		};
		appWindow.setBlockOnOpen(true);
		appWindow.open();
		Display.getCurrent().dispose();
	}
}


It appears that the layout() method in ApplicationWindowLayout assumes the 
first child control of the shell will be the 'top separator', which isn't the 
case if showTopSeperator() return false.
Comment 1 Susan McCourt CLA 2007-06-29 13:35:44 EDT
will look at this during 3.4
Comment 2 Susan McCourt CLA 2008-05-23 11:23:22 EDT
Removing milestone.  We simply ran out of time.
Comment 3 Remy Suen CLA 2008-07-24 22:08:29 EDT
I can see the blue composite just fine on I20080716-1200. That is, assuming that is what I'm supposed to see. ;)

Can you confirm this on Eclipse 3.4, Mark?
Comment 4 Susan McCourt CLA 2009-07-09 15:32:12 EDT
As per http://wiki.eclipse.org/Platform_UI/Bug_Triage_Change_2009
Comment 5 Eclipse Webmaster CLA 2019-09-06 15:30:46 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.