/** * Returns the default location to use for the shell. This default location * is used if the dialog does not have any persisted location to restore. * The default implementation uses the location computed by * {@link org.eclipse.jface.window.Window#getInitialLocation(Point)}. * Subclasses should override this method when an alternate default location * is desired, rather than overriding {@link #getInitialLocation(Point)}. * * @param initialSize * the initial size of the shell, as returned by * <code>getInitialSize</code>. * @return the initial location of the shell * * @see #getPersistLocation() * @since 3.4 */ protected Point getDefaultLocation(Point initialSize) { return super.getInitialLocation(initialSize); }
/** * Returns the default location to use for the shell. This default location * is used if the dialog does not have any persisted location to restore. * The default implementation uses the location computed by * {@link org.eclipse.jface.window.Window#getInitialLocation(Point)}. * Subclasses should override this method when an alternate default location * is desired, rather than overriding {@link #getInitialLocation(Point)}. * * @param initialSize * the initial size of the shell, as returned by * <code>getInitialSize</code>. * @return the initial location of the shell * * @see #getPersistLocation() * @since 3.4 */ protected Point getDefaultLocation(Point initialSize) { return super.getInitialLocation(initialSize); }
/** * Returns the default location to use for the shell. This default location * is used if the dialog does not have any persisted location to restore. * The default implementation uses the location computed by * {@link org.eclipse.jface.window.Window#getInitialLocation(Point)}. * Subclasses should override this method when an alternate default location * is desired, rather than overriding {@link #getInitialLocation(Point)}. * * @param initialSize * the initial size of the shell, as returned by * <code>getInitialSize</code>. * @return the initial location of the shell * * @see #getPersistLocation() * @since 1.1 */ protected Point getDefaultLocation(Point initialSize) { return super.getInitialLocation(initialSize); }
/** * Initializes the location and size of this window's SWT shell after it has * been created. * <p> * This framework method is called by the <code>create</code> framework * method. The default implementation calls <code>getInitialSize</code> * and <code>getInitialLocation</code> and passes the results to * <code>Shell.setBounds</code>. This is only done if the bounds of the * shell have not already been modified. Subclasses may extend or * reimplement. * </p> */ protected void initializeBounds() { if (resizeListener != null) { shell.removeListener(SWT.Resize, resizeListener); } if (resizeHasOccurred) { // Check if shell size has been set already. return; } Point size = getInitialSize(); Point location = getInitialLocation(size); shell.setBounds(getConstrainedShellBounds(new Rectangle(location.x, location.y, size.x, size.y))); }
/** * Initializes the location and size of this window's SWT shell after it has * been created. * <p> * This framework method is called by the <code>create</code> framework * method. The default implementation calls <code>getInitialSize</code> * and <code>getInitialLocation</code> and passes the results to * <code>Shell.setBounds</code>. This is only done if the bounds of the * shell have not already been modified. Subclasses may extend or * reimplement. * </p> */ protected void initializeBounds() { if (resizeListener != null) { shell.removeListener(SWT.Resize, resizeListener); } if (resizeHasOccurred) { // Check if shell size has been set already. return; } Point size = getInitialSize(); Point location = getInitialLocation(size); shell.setBounds(getConstrainedShellBounds(new Rectangle(location.x, location.y, size.x, size.y))); }
/** * Initializes the location and size of this window's SWT shell after it has * been created. * <p> * This framework method is called by the <code>create</code> framework * method. The default implementation calls <code>getInitialSize</code> * and <code>getInitialLocation</code> and passes the results to * <code>Shell.setBounds</code>. This is only done if the bounds of the * shell have not already been modified. Subclasses may extend or * reimplement. * </p> */ protected void initializeBounds() { if (resizeListener != null) { shell.removeListener(SWT.Resize, resizeListener); } if (resizeHasOccurred) { // Check if shell size has been set already. return; } Point size = getInitialSize(); Point location = getInitialLocation(size); shell.setBounds(getConstrainedShellBounds(new Rectangle(location.x, location.y, size.x, size.y))); }
Point result = super.getInitialLocation(initialSize); if ((getDialogBoundsStrategy() & DIALOG_PERSISTLOCATION)!= 0) { IDialogSettings settings = getDialogBoundsSettings();
Point result = super.getInitialLocation(initialSize); if ((getDialogBoundsStrategy() & DIALOG_PERSISTLOCATION)!= 0) { IDialogSettings settings = getDialogBoundsSettings();