Package org.eclipse.swt.widgets

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


            }
        });
       
        if (active) {
            Control control = getContext().getViewportPane().getControl();
            control.addKeyListener(this);
        }else{
            Control control = getContext().getViewportPane().getControl();
            control.removeKeyListener(this);
        }
       
View Full Code Here


        }

        Control editorControl = this.cellEditor.getEditorControl();

        // propagate the ESC event from the editor to the dialog
        editorControl.addKeyListener(getEscKeyListener());

        GridDataFactory.fillDefaults().grab(true, false).hint(100, 20)
                .indent(5, 0).applyTo(editorControl);
        // if the editor control already has no layout data set already, apply
        // the default one
View Full Code Here

                this.configRegistry);

        Control editorControl = this.cellEditor.getEditorControl();

        // propagate the ESC event from the editor to the dialog
        editorControl.addKeyListener(getEscKeyListener());

        // if the editor control already has no layout data set already, apply
        // the default one
        // this check allows to specify a custom layout data while creating the
        // editor control
View Full Code Here

        public void focusLost(FocusEvent e) {
          control.setVisible(false);
        }
      });

      control.addKeyListener(new KeyAdapter() {
        @Override
        public void keyPressed(KeyEvent e) {
          if (e.character == SWT.CR && control.isFocusControl()) {
            table.notifyListeners(SWT.DefaultSelection, new Event());
          }
View Full Code Here

          addAction.run();
        }
      }
    });
    // backspace on list to delete
    control.addKeyListener(new KeyAdapter() {
      @Override
      public void keyReleased(KeyEvent e) {
        if ((e.stateMask == 0 && e.keyCode == SWT.BS) || (e.stateMask == 0 && e.keyCode == SWT.DEL)) {
          deleteAction.run();
        }
View Full Code Here

    delete.setText("Delete");
    delete.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_CENTER));


    // backspace on list to delete
    control.addKeyListener(new KeyAdapter() {
      @Override
      public void keyReleased(KeyEvent e) {
        if ((e.stateMask == 0 && e.keyCode == SWT.BS) || (e.stateMask == 0 && e.keyCode == SWT.DEL)) {
          deleteAction.run();
        }
View Full Code Here

        if (page instanceof IOConsolePage) {

            //Note that completions on "all letters and '_'" are already activated just by installing
            //the content assist, but the completions on the default keybinding is not, so, we have to
            //call it ourselves here.
            control.addKeyListener(new KeyListener() {
                public void keyPressed(KeyEvent e) {

                    if (KeyBindingHelper.matchesContentAssistKeybinding(e)) {
                        contentAssist.showPossibleCompletions();
                    }
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.