Examples of KeyListener


Examples of org.eclipse.swt.events.KeyListener

    projectLabel.setText("Project:");

    projectCombo = new Combo(control, SWT.BORDER);
    GridData projectGridData = new GridData(GridData.FILL_HORIZONTAL);
    projectCombo.setLayoutData(projectGridData);
    projectCombo.addKeyListener(new KeyListener() {

      @Override
      public void keyPressed(KeyEvent e) {
      }

      @Override
      public void keyReleased(KeyEvent e) {
        setTabDirty();
      }
    });

    projectCombo.addSelectionListener(new SelectionListener() {

      @Override
      public void widgetDefaultSelected(SelectionEvent e) {
      }

      @Override
      public void widgetSelected(SelectionEvent e) {
        setUpConfFileCombo();
        setTabDirty();
      }
    });

    Label confFileLabel = new Label(control, SWT.NONE);
    confFileLabel.setText("Conf File:");

    confFileCombo = new Combo(control, SWT.BORDER);
    GridData confFileGridData = new GridData(GridData.FILL_HORIZONTAL);
    confFileCombo.setLayoutData(confFileGridData);
    confFileCombo.addKeyListener(new KeyListener() {

      @Override
      public void keyPressed(KeyEvent e) {
      }
View Full Code Here

Examples of org.eclipse.swt.events.KeyListener

            new FastPartitioner(
                new DRLPartionScanner(),
                DRLPartionScanner.LEGAL_CONTENT_TYPES);
        partitioner.connect(document);
        document.setDocumentPartitioner(partitioner);
        constraintViewer.getControl().addKeyListener(new KeyListener() {
            public void keyPressed(KeyEvent e) {
                if (e.character == ' ' && e.stateMask == SWT.CTRL) {
                    constraintViewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
                }
            }
View Full Code Here

Examples of org.eclipse.swt.events.KeyListener

            new FastPartitioner(
                new DRLPartionScanner(),
                DRLPartionScanner.LEGAL_CONTENT_TYPES);
        partitioner.connect(document);
        document.setDocumentPartitioner(partitioner);
        actionViewer.getControl().addKeyListener(new KeyListener() {
            public void keyPressed(KeyEvent e) {
                if (e.character == ' ' && e.stateMask == SWT.CTRL) {
                    actionViewer.doOperation(ISourceViewer.CONTENTASSIST_PROPOSALS);
                }
            }
View Full Code Here

Examples of org.eclipse.swt.events.KeyListener

                fFilteredList.setFilter(fFilterText.getText());
            }
        };
        text.addListener(SWT.Modify, listener);

        text.addKeyListener(new KeyListener() {
            public void keyPressed(KeyEvent e) {
                if (e.keyCode == SWT.ARROW_DOWN) {
          fFilteredList.setFocus();
        }
            }
View Full Code Here

Examples of org.eclipse.swt.events.KeyListener

      backwardTriggerSequences = null;
    }
  }

  protected void addKeyListener(final Table table, final Shell dialog) {
    table.addKeyListener(new KeyListener() {
      private boolean firstKey = true;

      private boolean quickReleaseMode = false;

      public void keyPressed(KeyEvent e) {
View Full Code Here

Examples of org.eclipse.swt.events.KeyListener

        moveSash(sash, this);
    }

    public static void moveSash(final Sash sash,
            final LayoutPart toGetFocusWhenDone) {
        final KeyListener listener = new KeyAdapter() {
            public void keyPressed(KeyEvent e) {
                if (e.character == SWT.ESC || e.character == '\r') {
                    if (toGetFocusWhenDone != null) {
            toGetFocusWhenDone.setFocus();
          }
View Full Code Here

Examples of rtype.KeyListener

  }

 
  public void addEventListeners() {

    KeyListener fire2KeyEvent = new KeyListener()
    {
      public  void  onKeyDown(){};
      public  void  keyPressed()
      {
            if (orb != null)
              orb.setMove(Orb.ADJUDTING);
      };
      public  void  onKeyUp()
      {
        if (orb != null)
              orb.setMove(Orb.STICKED);
      };
    };
     EventManager.instance().addListener(fire2Key, fire2KeyEvent);
    
    
    
     KeyListener upKeyEvent = new KeyListener()
     {
       public  void  keyPressed()
      {
         speed.y += ACCELLERATION * tick;
            if (speed.y > MAX_SPEED)
              speed.y = MAX_SPEED;
      };
     
      public  void  onKeyUp()
      {
        y_deceleration = -DEFAULT_DECELERATION;
      };
     };
     EventManager.instance().addListener(upKey, upKeyEvent);
    
     KeyListener downKeyEvent = new KeyListener()
     {
       public  void  onKeyDown()
       {
        
       };
       public  void  keyPressed()
      {
         speed.y -= ACCELLERATION * tick;
            if (speed.y < -MAX_SPEED)
              speed.y = -MAX_SPEED;
      };
       public  void  onKeyUp()
      {
         y_deceleration = DEFAULT_DECELERATION;
      }
     };
     EventManager.instance().addListener(downKey, downKeyEvent);
    
    
     KeyListener leftKeyEvent = new KeyListener()
     {
       public  void  onKeyDown()
       {
        
       };
       public  void  keyPressed()
      {
         speed.x -= ACCELLERATION * tick;
            if (speed.x < -MAX_SPEED)
              speed.x = -MAX_SPEED;
      };
       public  void  onKeyUp()
      {
         x_deceleration = DEFAULT_DECELERATION;
      }
     };
     EventManager.instance().addListener(leftKey, leftKeyEvent);
    
     KeyListener rightKeyEvent = new KeyListener()
     {
       public  void  onKeyDown()
       {
        
       };
       public  void  keyPressed()
      {
         speed.x += ACCELLERATION * tick;
            if (speed.x > MAX_SPEED)
              speed.x = MAX_SPEED;
            accelerateEntrity.startAnimation();
      };
       public  void  onKeyUp()
      {
         accelerateEntrity.stopAnimation();
              x_deceleration = -DEFAULT_DECELERATION;
      }
     };
     EventManager.instance().addListener(rightKey, rightKeyEvent);
    
    
     KeyListener fire1KeyEvent = new KeyListener()
     {
       public  void  onKeyDown()
       {
         concentrateAnimation.fire(0.1f);
         concentrateAnimation.startChargingAnimation();
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.