org.eclipse.jface.window.Window.getInitialSize()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(71)

本文整理了Java中org.eclipse.jface.window.Window.getInitialSize()方法的一些代码示例,展示了Window.getInitialSize()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.getInitialSize()方法的具体详情如下:
包路径:org.eclipse.jface.window.Window
类名称:Window
方法名:getInitialSize

Window.getInitialSize介绍

[英]Returns the initial size to use for the shell. The default implementation returns the preferred size of the shell, using Shell.computeSize(SWT.DEFAULT, SWT.DEFAULT, true).
[中]返回用于外壳的初始大小。默认实现使用[$0$]返回shell的首选大小。

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

/**
 * Return the default size to use for the shell. This default size is used
 * if the dialog does not have any persisted size to restore. The default
 * implementation returns the preferred size of the shell. Subclasses should
 * override this method when an alternate default size is desired, rather
 * than overriding {@link #getInitialSize()}.
 *
 * @return the initial size of the shell
 *
 * @see #getPersistSize()
 * @since 3.4
 */
protected Point getDefaultSize() {
  return super.getInitialSize();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * Return the default size to use for the shell. This default size is used
 * if the dialog does not have any persisted size to restore. The default
 * implementation returns the preferred size of the shell. Subclasses should
 * override this method when an alternate default size is desired, rather
 * than overriding {@link #getInitialSize()}.
 *
 * @return the initial size of the shell
 *
 * @see #getPersistSize()
 * @since 3.4
 */
protected Point getDefaultSize() {
  return super.getInitialSize();
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

/**
 * Return the default size to use for the shell. This default size is used
 * if the dialog does not have any persisted size to restore. The default
 * implementation returns the preferred size of the shell. Subclasses should
 * override this method when an alternate default size is desired, rather
 * than overriding {@link #getInitialSize()}.
 * 
 * @return the initial size of the shell
 * 
 * @see #getPersistSize()
 * @since 1.1
 */
protected Point getDefaultSize() {
  return super.getInitialSize();
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

/**
 * 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)));
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

/**
 * 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)));
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * 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)));
}

代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface

Point result = super.getInitialSize();

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

Point result = super.getInitialSize();

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

Point result = super.getInitialSize();

相关文章