### Eclipse Workspace Patch 1.0 #P org.eclipse.jface Index: src/org/eclipse/jface/dialogs/TitleAreaDialog.java =================================================================== RCS file: /home/eclipse/org.eclipse.jface/src/org/eclipse/jface/dialogs/TitleAreaDialog.java,v retrieving revision 1.27 diff -u -r1.27 TitleAreaDialog.java --- src/org/eclipse/jface/dialogs/TitleAreaDialog.java 8 Dec 2005 19:55:13 -0000 1.27 +++ src/org/eclipse/jface/dialogs/TitleAreaDialog.java 9 Jan 2006 22:26:13 -0000 @@ -41,7 +41,7 @@ *

* This dialog class may be subclassed. */ -public class TitleAreaDialog extends Dialog { +public class TitleAreaDialog extends TrayDialog { /** * Image registry key for error message image. */ @@ -133,22 +133,21 @@ * @see Dialog.createContents(Composite) */ protected Control createContents(Composite parent) { + // create the overall composite + Composite contents = new Composite(parent, SWT.NONE); + contents.setLayoutData(new GridData(GridData.FILL_BOTH)); // initialize the dialog units - initializeDialogUnits(parent); + initializeDialogUnits(contents); FormLayout layout = new FormLayout(); - parent.setLayout(layout); - FormData data = new FormData(); - data.top = new FormAttachment(0, 0); - data.bottom = new FormAttachment(100, 0); - parent.setLayoutData(data); + contents.setLayout(layout); //Now create a work area for the rest of the dialog - workArea = new Composite(parent, SWT.NULL); + workArea = new Composite(contents, SWT.NONE); GridLayout childLayout = new GridLayout(); childLayout.marginHeight = 0; childLayout.marginWidth = 0; childLayout.verticalSpacing = 0; workArea.setLayout(childLayout); - Control top = createTitleArea(parent); + Control top = createTitleArea(contents); resetWorkAreaAttachments(top); workArea.setFont(JFaceResources.getDialogFont()); // initialize the dialog units @@ -156,7 +155,7 @@ // create the dialog area and button bar dialogArea = createDialogArea(workArea); buttonBar = createButtonBar(workArea); - return parent; + return contents; } /** @@ -458,7 +457,7 @@ //Do not layout before the dialog area has been created //to avoid incomplete calculations. if (dialogArea != null) - getShell().layout(true); + workArea.getParent().layout(true); } /**