org.eclipse.swt.widgets.Shell.setFocus()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(173)

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

Shell.setFocus介绍

暂无

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

private void setXMLStreamField() {
 try {
  wXMLField.removeAll();
  RowMetaInterface r = transMeta.getPrevStepFields( stepname );
  if ( r != null ) {
   String[] fieldNames = r.getFieldNames();
   if ( fieldNames != null ) {
    for ( int i = 0; i < fieldNames.length; i++ ) {
     wXMLField.add( fieldNames[i] );
    }
   }
  }
 } catch ( KettleException ke ) {
  if ( !Const.isOSX() ) { // see PDI-8871 for details
   shell.setFocus();
  }
  wXMLField.add( EMPTY_FIELDS );
  wXMLField.setText( EMPTY_FIELDS );
  new ErrorDialog( shell, BaseMessages.getString( PKG, "GetXMLDataDialog.FailedToGetFields.DialogTitle" ),
    BaseMessages.getString( PKG, "GetXMLDataDialog.FailedToGetFields.DialogMessage" ), ke );
 }
}

代码示例来源:origin: org.eclipse.scout.sdk.s2e/org.eclipse.scout.sdk.s2e.nls

public void setFocus() {
 m_shell.setFocus();
}

代码示例来源:origin: org.apache.uima/uimaj-ep-cas-editor

@Override
public void setFocus() {
 mShell.setFocus();
}

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

/**
   * Requests the proposal shell to take focus.
   *
   * @since 3.0
   */
  public void setFocus() {
    if (Helper2.okToUse(fProposalShell))
      fProposalShell.setFocus();
  }
}

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

/**
 * This default implementation sets the focus on the popup shell.
 * Subclasses can override or extend.
 *
 * @see IInformationControl#setFocus()
 */
@Override
public void setFocus() {
  boolean focusTaken= fShell.setFocus();
  if (!focusTaken)
    fShell.forceFocus();
}

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

/**
 * This default implementation sets the focus on the popup shell.
 * Subclasses can override or extend.
 *
 * @see IInformationControl#setFocus()
 */
@Override
public void setFocus() {
  boolean focusTaken= fShell.setFocus();
  if (!focusTaken)
    fShell.forceFocus();
}

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

/**
 * Requests the proposal shell to take focus.
 *
 * @since 3.0
 */
public void setFocus() {
  if (Helper.okToUse(fProposalShell)) {
    fProposalShell.setFocus();
  }
}

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

/**
   * Requests the proposal shell to take focus.
   *
   * @since 3.0
   */
  public void setFocus() {
    if (Helper2.okToUse(fProposalShell))
      fProposalShell.setFocus();
  }
}

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

/**
 * Requests the proposal shell to take focus.
 *
 * @since 3.0
 */
public void setFocus() {
  if (Helper.okToUse(fProposalShell)) {
    fProposalShell.setFocus();
  }
}

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

/**
 * Sets focus to the proposal popup. If the proposal popup is not opened,
 * this method is ignored. If the secondary popup has focus, focus is
 * returned to the main proposal popup.
 *
 * @since 3.6
 */
public void setProposalPopupFocus() {
  if (isValid() && popup != null)
    popup.getShell().setFocus();
}

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

/**
 * Sets focus to the proposal popup. If the proposal popup is not opened,
 * this method is ignored. If the secondary popup has focus, focus is
 * returned to the main proposal popup.
 *
 * @since 3.6
 */
public void setProposalPopupFocus() {
  if (isValid() && popup != null)
    popup.getShell().setFocus();
}

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

/**
 * Sets focus to the proposal popup. If the proposal popup is not opened,
 * this method is ignored. If the secondary popup has focus, focus is returned
 * to the main proposal popup.
 *
 * @since 1.3
 */
public void setProposalPopupFocus() {
  if (isValid() && popup != null) {
 popup.getShell().setFocus();
}
}

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

public void open() {
  if (shell.isVisible()) {
    shell.setFocus();
  } else {
    shell.open();
  }
  searchText.setFocus();
}
public void setSearchAreaNames(String[] names) {

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

private void openDropDown() {
  Shell shell = fParent.getDropDownShell();
  if (shell == null) {
    fParent.openDropDownMenu();
    shell = fParent.getDropDownShell();
  }
  shell.setFocus();
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
  public void run() {
    Shell shell= fParent.getDropDownShell();
    if (shell != null)
      return;
    shell= fParent.getViewer().getDropDownShell();
    if (shell != null)
      shell.close();
    showMenu();
    fShell.setFocus();
  }
};

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

@Override
  public void run() {
    Shell shell= fParent.getDropDownShell();
    if (shell != null)
      return;
    shell= fParent.getViewer().getDropDownShell();
    if (shell != null)
      shell.close();
    showMenu();
    fShell.setFocus();
  }
};

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

private void openDropDown() {
  BreadcrumbViewer viewer= fParent.getViewer();
  int index= viewer.getIndexOfItem(fParent);
  BreadcrumbItem parent= fParent.getViewer().getItem(index - 1);
  Shell shell= parent.getDropDownShell();
  if (shell == null) {
    parent.openDropDownMenu();
    shell= parent.getDropDownShell();
  }
  shell.setFocus();
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

private void openDropDown() {
  BreadcrumbViewer viewer= fParent.getViewer();
  int index= viewer.getIndexOfItem(fParent);
  BreadcrumbItem parent= fParent.getViewer().getItem(index - 1);
  Shell shell= parent.getDropDownShell();
  if (shell == null) {
    parent.openDropDownMenu();
    shell= parent.getDropDownShell();
  }
  shell.setFocus();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

@Override
public void dispose () {
  if (isDisposed()) return;
  if (!isValidThread ()) error (SWT.ERROR_THREAD_INVALID_ACCESS);
  if (!(this instanceof Shell)) {
    if (!traverseDecorations (true)) {
      Shell shell = getShell ();
      shell.setFocus ();
    }
    setVisible (false);
  }
  super.dispose ();
}

代码示例来源:origin: be.yildiz-games/module-window-swt

/**
 * Make the window use all the screen and remove the title bar.
 */
void setFullScreen() {
  this.shell.setFullScreen(true);
  this.shell.setFocus();
  final Monitor m = Display.getDefault().getPrimaryMonitor();
  this.shell.setBounds(-1, -1, m.getBounds().width + 2, m.getBounds().height + 2);
  this.screenSize = new ScreenSize(m.getBounds().width, m.getBounds().height);
}

相关文章

微信公众号

最新文章

更多

Shell类方法