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

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

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

Window.getShellStyle介绍

[英]Returns the shell style bits.

The default value is SWT.CLOSE|SWT.MIN|SWT.MAX|SWT.RESIZE. Subclasses should call setShellStyle to change this value, rather than overriding this method.
[中]返回shell样式位。
默认值为[$0$]。子类应该调用setShellStyle来更改此值,而不是重写此方法。

代码示例

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

/**
 * Returns parent shell, under which this window's shell is created.
 *
 * @return the parent shell, or <code>null</code> if there is no parent
 *         shell
 */
protected Shell getParentShell() {
  Shell parent = parentShell.getShell();
  int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL;
  if ((getShellStyle() & modal) != 0) {
    // If this is a modal shell with no parent, pick a shell using defaultModalParent.
    if (parent == null) {
      parent = defaultModalParent.getShell();
    }
  }
  return parent;
}

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

/**
 * Returns parent shell, under which this window's shell is created.
 *
 * @return the parent shell, or <code>null</code> if there is no parent
 *         shell
 */
protected Shell getParentShell() {
  Shell parent = parentShell.getShell();
  int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL;
  if ((getShellStyle() & modal) != 0) {
    // If this is a modal shell with no parent, pick a shell using defaultModalParent.
    if (parent == null) {
      parent = defaultModalParent.getShell();
    }
  }
  return parent;
}

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

/**
 * Creates a window instance, whose shell will be created under the given
 * parent shell. Note that the window will have no visual representation
 * until it is told to open. By default, <code>open</code> does not block.
 *
 * @param parentShell
 *            the parent shell, or <code>null</code> to create a top-level
 *            shell. Try passing "(Shell)null" to this method instead of "null"
 *            if your compiler complains about an ambiguity error.
 * @see #setBlockOnOpen
 * @see #getDefaultOrientation()
 */
protected Window(Shell parentShell) {
  this(new SameShellProvider(parentShell));
  if(parentShell == null) {
    setShellStyle(getShellStyle() | getDefaultOrientation());
  }
}

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

/**
 * Creates a window instance, whose shell will be created under the given
 * parent shell. Note that the window will have no visual representation
 * until it is told to open. By default, <code>open</code> does not block.
 *
 * @param parentShell
 *            the parent shell, or <code>null</code> to create a top-level
 *            shell. Try passing "(Shell)null" to this method instead of "null"
 *            if your compiler complains about an ambiguity error.
 * @see #setBlockOnOpen
 * @see #getDefaultOrientation()
 */
protected Window(Shell parentShell) {
  this(new SameShellProvider(parentShell));
  if(parentShell == null) {
    setShellStyle(getShellStyle() | getDefaultOrientation());
  }
}

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

/**
 * Creates a window instance, whose shell will be created under the given
 * parent shell. Note that the window will have no visual representation
 * until it is told to open. By default, <code>open</code> does not block.
 * 
 * @param parentShell
 *            the parent shell, or <code>null</code> to create a top-level
 *            shell. Try passing "(Shell)null" to this method instead of "null"
 *            if your compiler complains about an ambiguity error.
 * @see #setBlockOnOpen
 * @see #getDefaultOrientation()
 */
protected Window(Shell parentShell) {
  this(new SameShellProvider(parentShell));
  
  if(parentShell == null) {
    setShellStyle(getShellStyle() | getDefaultOrientation());
  }
}

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

/**
   * Returns parent shell, under which this window's shell is created.
   * 
   * @return the parent shell, or <code>null</code> if there is no parent
   *         shell
   */
  protected Shell getParentShell() {
    Shell parent = parentShell.getShell();
 
    int modal = SWT.APPLICATION_MODAL | SWT.SYSTEM_MODAL | SWT.PRIMARY_MODAL;

    if ((getShellStyle() & modal) != 0) {
      // If this is a modal shell with no parent, pick a shell using defaultModalParent.
      if (parent == null) {
// RAP [if] Session scoped defaultModalParent
//                parent = defaultModalParent.getShell();
        parent = getDefaultModalParent().getShell();
      }
    }
    
    return parent;
  }

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

Shell newShell = new Shell(newParent, getShellStyle());

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

Shell newShell = new Shell(newParent, getShellStyle());

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

Shell newShell = new Shell(newParent, getShellStyle());

相关文章