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

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

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

Shell.saveFocus介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

void windowDidResignKey(long /*int*/ id, long /*int*/ sel, long /*int*/ notification) {
  if (display.isDisposed()) return;
  sendEvent (SWT.Deactivate);
  if (isDisposed ()) return;
  setActiveControl (null);
  if (isDisposed ()) return;
  saveFocus();
}

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

final void setActiveShell( Shell activeShell ) {
 checkDevice();
 if( this.activeShell != activeShell ) {
  Shell lastActiveShell = this.activeShell;
  if( this.activeShell != null ) {
   this.activeShell.saveFocus();
  }
  // Move active shell to end of list to maintain correct z-order
  if( activeShell != null ) {
   shells.remove( activeShell );
   shells.add( activeShell );
  }
  if( lastActiveShell != null && !lastActiveShell.hasState( Widget.DISPOSE_SENT ) ) {
   lastActiveShell.notifyListeners( SWT.Deactivate, new Event() );
  }
  this.activeShell = activeShell;
  if( activeShell != null ) {
   activeShell.notifyListeners( SWT.Activate, new Event() );
  }
  if( this.activeShell != null ) {
   this.activeShell.restoreFocus();
  }
 }
}

相关文章

微信公众号

最新文章

更多

Shell类方法