Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.FocusListener


          e.doit = advance(false);
        else if (e.detail != SWT.TRAVERSE_RETURN)
          e.doit = true;
      }
    });
    addFocusListener(new FocusListener() {
      public void focusGained(FocusEvent e) {
        if (!hasFocus) {
          hasFocus = true;
          if (DEBUG_FOCUS) {
            System.out.println("FormText: focus gained"); //$NON-NLS-1$
View Full Code Here


        table.setBounds(tableBounds);
        dialog.pack();

        tc.setWidth(table.getClientArea().width);
        table.setFocus();
        table.addFocusListener(new FocusListener() {
            public void focusGained(FocusEvent e) {
            }

            public void focusLost(FocusEvent e) {
                cancel(dialog);
View Full Code Here

        table.setBounds(tableBounds);
        dialog.pack();

        tc.setWidth(table.getClientArea().width);
        table.setFocus();
        table.addFocusListener(new FocusListener() {
            public void focusGained(FocusEvent e) {
            }

            public void focusLost(FocusEvent e) {
                cancel(dialog);
View Full Code Here

  /**
   * Create fFocusListener and install it on fControl.
   */
  private void installFocusListener() {
    fFocusListener= new FocusListener() {
      public void focusGained(final FocusEvent e) {
        if (fHandlerActivation == null)
          activateHandler();
      }
      public void focusLost(FocusEvent e) {
View Full Code Here

   * @since 3.2
   */
    private void addCommandSupport(final Control control) {
      final KeySequence commandSequence= fContentAssistant.getRepeatedInvocationKeySequence();
      if (commandSequence != null && !commandSequence.isEmpty() && fContentAssistant.isRepeatedInvocationMode()) {
        control.addFocusListener(new FocusListener() {
          private CommandKeyListener fCommandKeyListener;
          public void focusGained(FocusEvent e) {
            if (Helper.okToUse(control)) {
              if (fCommandKeyListener == null) {
                fCommandKeyListener= new CommandKeyListener(commandSequence);
                fProposalTable.addKeyListener(fCommandKeyListener);
              }
            }
          }
          public void focusLost(FocusEvent e) {
            if (fCommandKeyListener != null) {
              control.removeKeyListener(fCommandKeyListener);
              fCommandKeyListener= null;
            }
          }
        });
      }
      if (fAdditionalInfoController != null) {
        control.addFocusListener(new FocusListener() {
          private TraverseListener fTraverseListener;
          public void focusGained(FocusEvent e) {
            if (Helper.okToUse(control)) {
              if (fTraverseListener == null) {
                fTraverseListener= new TraverseListener() {
View Full Code Here

          e.doit = advance(false);
        else if (e.detail != SWT.TRAVERSE_RETURN)
          e.doit = true;
      }
    });
    addFocusListener(new FocusListener() {
      public void focusGained(FocusEvent e) {
        if (!hasFocus) {
          hasFocus = true;
          if (DEBUG_FOCUS) {
            System.out.println("FormText: focus gained"); //$NON-NLS-1$
View Full Code Here

        layout.marginHeight= 0;
        composite.setLayout(layout);

        fNameText= createText(composite);
        fNameText.addModifyListener(listener);
        fNameText.addFocusListener(new FocusListener() {

          public void focusGained(FocusEvent e) {
          }

          public void focusLost(FocusEvent e) {
View Full Code Here

        public void widgetDisposed(DisposeEvent e) {
          handlerService.deactivateHandlers(handlerActivations);
        }
      });

      fPatternEditor.getTextWidget().addFocusListener(new FocusListener() {
        public void focusLost(FocusEvent e) {
          handlerService.deactivateHandlers(handlerActivations);
        }

        public void focusGained(FocusEvent e) {
View Full Code Here

          }
        }
      });
      if ((getExpansionStyle()&FOCUS_TITLE)==0) {
        toggle.paintFocus=false;
        toggle.addFocusListener(new FocusListener() {
          public void focusGained(FocusEvent e) {
            if (textLabel != null) {
                textLabel.redraw();
            }
          }
View Full Code Here

      setErrorMessage("Invalid url");
     
          createControl(parent);
         
          Button button = getChangeControl(parent);
          button.addFocusListener(new FocusListener() {
        public void focusGained(FocusEvent e) {
        }

        public void focusLost(FocusEvent e) {
          if (isValid()) {
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.FocusListener

Copyright © 2018 www.massapicom. 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.