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

x33g5p2x  于2022-01-16 转载在 其他  
字(3.9k)|赞(0)|评价(0)|浏览(171)

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

Button.setFocus介绍

暂无

代码示例

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

  1. public boolean setFocus() {
  2. return wBox.setFocus();
  3. }

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

  1. public void getData() {
  2. if ( text != null ) {
  3. wDesc.setText( text );
  4. }
  5. if ( readonly ) {
  6. wOK.setFocus();
  7. } else {
  8. wDesc.setFocus();
  9. }
  10. }

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

  1. protected void openDialog() {
  2. shell.pack();
  3. // Set the focus on the OK button
  4. wOK.setFocus();
  5. Rectangle shellBounds = getParent().getBounds();
  6. Point dialogSize = shell.getSize();
  7. shell.setLocation( shellBounds.x + ( shellBounds.width - dialogSize.x ) / 2, shellBounds.y
  8. + ( shellBounds.height - dialogSize.y ) / 2 );
  9. shell.open();
  10. while ( !shell.isDisposed() ) {
  11. if ( !display.readAndDispatch() ) {
  12. display.sleep();
  13. }
  14. }
  15. }

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

  1. wOK.setFocus();

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

  1. Rectangle screenSize = display.getPrimaryMonitor().getBounds();
  2. shell.setLocation( ( screenSize.width - shell.getBounds().width ) / 2, ( screenSize.height - shell.getBounds().height ) / 2 );
  3. closeButton.setFocus();
  4. shell.open();
  5. while ( !shell.isDisposed() ) {

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

  1. wLaunch.setFocus();
  2. shell.setDefaultButton( wLaunch );

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

  1. wOK.setFocus();
  2. shell.pack();
  3. shell.open();

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

  1. button.setFocus();

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

  1. wOK.setFocus();

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

  1. @Override
  2. public void setFocus() {
  3. if (checkBox != null) {
  4. checkBox.setFocus();
  5. }
  6. }

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

  1. public void setFocus() {
  2. if (checkBox != null) {
  3. checkBox.setFocus();
  4. }
  5. }

代码示例来源:origin: inspectIT/inspectIT

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void createButtonsForButtonBar(Composite parent) {
  6. createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, true).setFocus();
  7. }

代码示例来源:origin: BiglySoftware/BiglyBT

  1. @Override
  2. public void widgetSelected(SelectionEvent event) {
  3. // force focusout on osx
  4. apply.setFocus();
  5. save();
  6. }
  7. });

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

  1. @Override
  2. boolean mnemonicHit (char key) {
  3. if (labelHandle == 0) return false;
  4. boolean result = super.mnemonicHit (labelHandle, key);
  5. if (result) setFocus ();
  6. return result;
  7. }

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

  1. @Override
  2. boolean mnemonicHit (char key) {
  3. if (labelHandle == 0) return false;
  4. boolean result = super.mnemonicHit (labelHandle, key);
  5. if (result) setFocus ();
  6. return result;
  7. }

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

  1. @Override
  2. public void applyData(Object data) {
  3. if (ComparePreferencePage.CAPPING_DISABLED.equals(data)) {
  4. fTextCompareTab.getParent().setSelection(fTextCompareTab);
  5. fDisableCappingCheckBox.setFocus();
  6. }
  7. }
  8. }

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

  1. @Override
  2. protected void doSetFocus() {
  3. button.setFocus();
  4. // add a FocusListener to the button
  5. button.addFocusListener(getButtonFocusListener());
  6. }

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

  1. @Override
  2. protected void createButtonsForButtonBar(Composite parent) {
  3. super.createButtonsForButtonBar(parent);
  4. Button ok= getButton(IDialogConstants.OK_ID);
  5. ok.setText( RefactoringMessages.ChangeExceptionHandler_undo_button);
  6. Button abort= createButton(parent, IDialogConstants.CANCEL_ID, RefactoringMessages.ChangeExceptionHandler_abort_button, true);
  7. abort.moveBelow(ok);
  8. abort.setFocus();
  9. }
  10. @Override

代码示例来源:origin: inspectIT/inspectIT

  1. /**
  2. * {@inheritDoc}
  3. */
  4. @Override
  5. protected void createButtonsForButtonBar(Composite parent) {
  6. createButton(parent, IDialogConstants.DETAILS_ID, IDialogConstants.SHOW_DETAILS_LABEL, false);
  7. createButton(parent, IDialogConstants.CLIENT_ID, "Send Error Report", false);
  8. createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CLOSE_LABEL, true).setFocus();
  9. }

代码示例来源:origin: BiglySoftware/BiglyBT

  1. @Override
  2. public void widgetSelected(SelectionEvent event) {
  3. // force focusout on osx
  4. apply.setFocus();
  5. save();
  6. apply.getShell().dispose();
  7. }
  8. });

相关文章

Button类方法