Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Control.forceFocus()


                    // It's necessary to restore focus after reenabling the controls
                    // because disabling them causes focus to jump elsewhere.
                    // Use forceFocus rather than setFocus to avoid SWT's
                    // search for children which can take focus, so focus
                    // ends up back on the actual control that previously had it.
                    currentFocus.forceFocus();
                }
            }
        } finally {
            operationInProgress = false;
        }
View Full Code Here


      public void run() {
        if (widget instanceof Control) {
          Control control = (Control) widget;
          control.getShell().forceActive();
          control.getShell().forceFocus();
          control.forceFocus();
        }
      }
    });
  }
View Full Code Here

      public void run() {
        if (widget instanceof Control) {
          Control control = (Control) widget;
          control.getShell().forceActive();
          control.getShell().forceFocus();
          control.forceFocus();
        }
      }
    });
  }
View Full Code Here

          Control control = (Control) widget;
          if (hasFocus(control))
            return;
          control.getShell().forceActive();
          control.getShell().forceFocus();
          control.forceFocus();
        }
      }

      private boolean hasFocus(Control control) {
        return control.isFocusControl();
View Full Code Here

  public void setFocus() {
    super.setFocus();
    Control control = fDesignViewer.getControl();
    control.setFocus();
    // 271382 - Focus not set properly after activating XML editor
    control.forceFocus();
  }

  public void setInitializationData(IConfigurationElement cfig, String propertyName, Object data) {
    super.setInitializationData(cfig, propertyName, data);
    fPageInitializer = new PageInitializationData(cfig, propertyName, data);
View Full Code Here

          Control control = (Control) widget;
          if (hasFocus(control))
            return;
          control.getShell().forceActive();
          control.getShell().forceFocus();
          control.forceFocus();
        }
      }

      private boolean hasFocus(Control control) {
        return control.isFocusControl();
View Full Code Here

                    // It's necessary to restore focus after reenabling the controls
                    // because disabling them causes focus to jump elsewhere.
                    // Use forceFocus rather than setFocus to avoid SWT's
                    // search for children which can take focus, so focus
                    // ends up back on the actual control that previously had it.
                    currentFocus.forceFocus();
                }
            }
        } finally {
            operationInProgress = false;
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.