Bug 134401 Bug in JFace Window JavaDoc
Eclipse: 3.2 M5 Class: org.eclipse.jface.window.Window In text below "getContents()" should be used instead of "getControl()". /** * Creates and returns this window's contents. Subclasses may attach any * number of children to the parent. As a convenience, the return value of * this method will be remembered and returned by subsequent calls to * getControl(). Subclasses may modify the parent's layout if they overload * getLayout() to return null. * * <p> * It is common practise to create and return a single composite that * contains the entire window contents. * </p> * * <p> * The default implementation of this framework method creates an instance * of <code>Composite</code>. Subclasses may override. * </p> * * @param parent * the parent composite for the controls in this window. The type * of layout used is determined by getLayout() * * @return the control that will be returned by subsequent calls to * getControl() */ protected Control createContents(Composite parent) { // by default, just create a composite return new Composite(parent, SWT.NONE); }
bundles/org.eclipse.jface/src/org/eclipse/jface/window/Window.java
* the left and 1/2 to the right) and vertically (1/3 above and 2/3 below)
	 * relative to the parent shell, or display bounds if there is no parent
	 * shell.
	 * 
	 * @param initialSize
	 *            the initial size of the shell, as returned by
	 *            <code>getInitialSize</code>.
	 * @return the initial location of the shell
	 */
	protected Point getInitialLocation(Point initialSize) {
		Composite parent = shell.getParent();
		Monitor monitor = shell.getDisplay().getPrimaryMonitor();
		if (parent != null) {
			monitor = parent.getMonitor();
		}
		Rectangle monitorBounds = monitor.getClientArea();
		Point centerPoint;
		if (parent != null) {
			centerPoint = Geometry.centerPoint(parent.getBounds());
		} else {
			centerPoint = Geometry.centerPoint(monitorBounds);
		}
		return new Point(centerPoint.x - (initialSize.x / 2), Math.max(
				monitorBounds.y, Math.min(centerPoint.y
						- (initialSize.y * 2 / 3), monitorBounds.y
						+ monitorBounds.height - initialSize.y)));
	}
	/**
	 * Returns the initial size to use for the shell. The default implementation
	 * returns the preferred size of the shell, using