本文整理了Java中org.eclipse.jface.window.Window.getInitialLocation()
方法的一些代码示例,展示了Window.getInitialLocation()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.getInitialLocation()
方法的具体详情如下:
包路径:org.eclipse.jface.window.Window
类名称:Window
方法名:getInitialLocation
[英]Returns the initial location to use for the shell. The default implementation centers the shell horizontally (1/2 of the difference to 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.
[中]返回用于外壳的初始位置。默认实现将外壳水平居中(左侧为差的1/2,右侧为差的1/2)和垂直居中(上方为1/3,下方为2/3),如果没有父外壳,则显示边界。
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* 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);
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* 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);
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* 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);
}
代码示例来源: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.scout.sdk.deps/org.eclipse.jface
Point result = super.getInitialLocation(initialSize);
if ((getDialogBoundsStrategy() & DIALOG_PERSISTLOCATION)!= 0) {
IDialogSettings settings = getDialogBoundsSettings();
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
Point result = super.getInitialLocation(initialSize);
if ((getDialogBoundsStrategy() & DIALOG_PERSISTLOCATION)!= 0) {
IDialogSettings settings = getDialogBoundsSettings();
内容来源于网络,如有侵权,请联系作者删除!