Bug 52730 [Dialogs] TitleAreaDialog wrong doc for createDialogArea
/** * Creates and returns the contents of the upper part * of this dialog (above the button bar). * <p> * The <code>Dialog</code> implementation of this framework method * creates and returns a new <code>Composite</code> with * standard margins and spacing. Subclasses should override. * </p> * * @param the parent composite to contain the dialog area * @return the dialog area control */ protected Control createDialogArea(Composite parent) @@@@ The composite created by this method does _not_ have standard margings and spacing but 0-width margins and spacing.
bundles/org.eclipse.jface/src/org/eclipse/jface/dialogs/TitleAreaDialog.java
layoutForNewMessage();
}
/**
 * Re-layout the labels for the new message.
 */
private void layoutForNewMessage(){
	
	int verticalSpacing = convertVerticalDLUsToPixels(IDialogConstants.VERTICAL_SPACING);
	int horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
	
	
	if (errorMessage == null && messageImage == null) {
		setImageLabelVisible(false);
		
		setLayoutsForNormalMessage(verticalSpacing,horizontalSpacing);
		
	} else {
		messageImageLabel.setVisible(true);
		bottomFillerLabel.setVisible(true);
		leftFillerLabel.setVisible(true);
		
		/**
		 * Note that we do not use horizontalSpacing here 
		 * as when the background of the messages changes
		 * there will be gaps between the icon label and the
		 * message that are the background color of the shell.
		 * We add a leading space elsewhere to compendate for this.
		 */
		FormData data = new FormData();
		data.left = new FormAttachment(0, H_GAP_IMAGE);