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
leftFillerLabel = new Label(parent, SWT.CENTER);
	leftFillerLabel.setBackground(background);
	
	bottomFillerLabel = new Label(parent, SWT.CENTER);
	bottomFillerLabel.setBackground(background);
	
	setLayoutsForNormalMessage(verticalSpacing, horizontalSpacing);
	
	determineTitleImageLargest();
	if(titleImageLargest)
		return titleImage;
	else
		return messageLabel;
	
}
/**
 * Determine if the title image is larger than the title message
 * and message area. This is used for layout decisions.
 */
private void determineTitleImageLargest (){
	
	int titleY = titleImage.computeSize(SWT.DEFAULT,SWT.DEFAULT).y;
	
	int labelY = titleLabel.computeSize(SWT.DEFAULT,SWT.DEFAULT).y;
	labelY += messageLabel.computeSize(SWT.DEFAULT,SWT.DEFAULT).y;
	FontData[] data = messageLabel.getFont().getFontData();
	labelY += data[0].getHeight();