本文整理了Java中org.eclipse.swt.widgets.Shell.saveFocus()
方法的一些代码示例,展示了Shell.saveFocus()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Shell.saveFocus()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Shell
类名称: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();
}
}
}
内容来源于网络,如有侵权,请联系作者删除!