Examples of forceFocus()


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

          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

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

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

      public void handleEvent(Event event) {
        Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
        shell.setVisible(true);
        shell.setMinimized(false);
        shell.forceActive();
        shell.forceFocus();
      }});
    trayItem.addListener(SWT.Selection,new Listener() {
      public void handleEvent(Event event) {
        Boolean makeVisible = null;
        IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
View Full Code Here

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

              makeVisible = !shell.getVisible();
            shell.setVisible(makeVisible);
            if(makeVisible.booleanValue()) {
              shell.setMinimized(false);
              shell.forceActive();
              shell.forceFocus();
            }
          }
        }
//        Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
//        boolean visible = !shell.getVisible();
View Full Code Here

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

                      synchronized (this) {
                        this.wait(100);
                      }
                      shell.forceActive();
                      shell.setActive();
                      shell.forceFocus();

                      page.activate(editor);
                    } catch (Throwable T) {
                      T.printStackTrace();
                    }
View Full Code Here

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

          IPath selectedPath = (IPath) selectedContainers[0];
          IFolder selectedFolder = project.getParent().getFolder(selectedPath);
          IPath projectRelativePath = selectedFolder.getProjectRelativePath();
          EOGeneratorFormPage.this.getModel().setDestination(projectRelativePath.toPortableString());
        }
        destination.forceFocus();
      }
    });

    Label subclassDestinationLabel = toolkit.createLabel(pathsSection, "Subclass Destination:");
    subclassDestinationLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
View Full Code Here

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

          IPath selectedPath = (IPath) selectedContainers[0];
          IFolder selectedFolder = project.getParent().getFolder(selectedPath);
          IPath projectRelativePath = selectedFolder.getProjectRelativePath();
          EOGeneratorFormPage.this.getModel().setSubclassDestination(projectRelativePath.toPortableString());
        }
        subclassDestination.forceFocus();
      }
    });

    Composite templatesSection = createSection(toolkit, parent, "Templates", "These paths specify the templates that will be used to generate files.  If left blank, the defaults from the EOGenerator preference page will be used.", 1, 3);
    GridLayout templatesSectionLayout = (GridLayout) templatesSection.getLayout();
View Full Code Here

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

        directoryDialog.setFilterPath(EOGeneratorFormPage.this.getModel().getTemplateDir());
        String selectedDirectory = directoryDialog.open();
        if (selectedDirectory != null) {
          EOGeneratorFormPage.this.getModel().setTemplateDir(selectedDirectory);
        }
        templatesFolder.forceFocus();
      }
    });

    Label templateLabel = toolkit.createLabel(templatesSection, "Template:");
    templateLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
View Full Code Here

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

      public void widgetSelected(SelectionEvent selectionevent) {
        String selectedTemplate = EOGeneratorFormPage.this.selectTemplate("Select the superclass template.");
        if (selectedTemplate != null) {
          EOGeneratorFormPage.this.getModel().setJavaTemplate(selectedTemplate);
        }
        template.forceFocus();
      }
    });

    Label subclassTemplateLabel = toolkit.createLabel(templatesSection, "Subclass Template:");
    subclassTemplateLabel.setForeground(toolkit.getColors().getColor(IFormColors.TITLE));
View Full Code Here

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

      public void widgetSelected(SelectionEvent selectionevent) {
        String selectedTemplate = EOGeneratorFormPage.this.selectTemplate("Select the subclass template.");
        if (selectedTemplate != null) {
          EOGeneratorFormPage.this.getModel().setSubclassJavaTemplate(selectedTemplate);
        }
        subclassTemplate.forceFocus();
      }
    });

    Composite outputOptionsSection = createSection(toolkit, parent, "Options", "These flags control various output options for generated source.", 1, 3);
    GridLayout outputOptionsLayout = (GridLayout) outputOptionsSection.getLayout();
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.