Package java.awt.event

Examples of java.awt.event.KeyAdapter


            }
            for (String i : curProject.getSourceDirList()) {
                sourceModel.addElement(i);
            }
            projectName.setText(curProject.getProjectName());
            projectName.addKeyListener(new KeyAdapter() {
                @Override
                public void keyTyped(KeyEvent e) {
                    projectNameChanged = true;
                }
            });
View Full Code Here


                    submitComment(CloudCommentsPane.this.getSelectedBugs());
                    resetCommentBoxFont();
                }
            }
        });
        commentBox.addKeyListener(new KeyAdapter() {
            @Override
            public void keyPressed(KeyEvent e) {
                if (e.getKeyCode() == KeyEvent.VK_ESCAPE) {
                    cancelClicked();
                } else if (e.getKeyCode() == KeyEvent.VK_ENTER && (e.getModifiersEx() & InputEvent.CTRL_DOWN_MASK) != 0) {
View Full Code Here

    for(int i=0;i<this.dataAnsNum[this.currentNum];i++){

        flag[i]=new JTextField(this.dataflag[this.currentNum][i],8);
        option.add(flag[i]);
     
      flag[i].addKeyListener(new KeyAdapter(){
        public void keyPressed(KeyEvent e) {
          if(e.getKeyCode()==KeyEvent.VK_ENTER){
            for(int i=0;i<flag.length;i++){
              //System.out.println(flag.length);
              dataflag[currentNum][i]=flag[i].getText();
View Full Code Here

        chart.removeAll();
        chart.add(dc.showData(currentQuestion));
        chart.updateUI();
      }
    });
    input.addKeyListener(new KeyAdapter() {
      public void keyPressed(KeyEvent e) {
        if(e.getKeyCode()==KeyEvent.VK_ENTER){
          dc.addData(input.getText());
          input.setText("");
          chart.removeAll();
View Full Code Here

                                                  50 );
            tf.setFont( new Font( "monospaced",
                                  Font.PLAIN,
                                  12 ) );

            tf.addKeyListener( new KeyAdapter() {
                public void keyPressed(KeyEvent e)
                {
                    if ( e.getKeyCode() == KeyEvent.VK_ENTER ) {
                        okButt.doClick();
                        return;
View Full Code Here

                    returnCode = CANCEL_OPTION;
                    dispose();
                }
            });

        addKeyListener(new KeyAdapter(){
                public void keyPressed(KeyEvent e){
                    if(e.getKeyCode() == KeyEvent.VK_ESCAPE){
                        setVisible(false);
                        returnCode = CANCEL_OPTION;
                        dispose();
View Full Code Here

    public AboutDialog(Frame owner){
        super(owner);
        buildGUI();

        addKeyListener(new KeyAdapter(){
                public void keyPressed(KeyEvent e){
                    if(e.getKeyCode() == KeyEvent.VK_ESCAPE){
                        setVisible(false);
                        dispose();
                    }
View Full Code Here

                    returnCode = CANCEL_OPTION;
                    dispose();
                }
            });

        addKeyListener(new KeyAdapter(){
                public void keyPressed(KeyEvent e){
                    if(e.getKeyCode() == KeyEvent.VK_ESCAPE){
                        setVisible(false);
                        returnCode = CANCEL_OPTION;
                        dispose();
View Full Code Here

    }

    public Device getKeyboardDevice() {
        if (keyboardDevice == null) {
            keyboardDriver = new MyKeyboardDriver();
            keyListener = new KeyAdapter() {
                @Override
                public void keyPressed(KeyEvent e) {
                    KeyboardEvent k = new KeyboardEvent(KeyEvent.KEY_PRESSED,
                        e.getWhen(), e.getModifiersEx(), e.getKeyCode(), e.getKeyChar());
                    keyboardDriver.dispatchEvent(k);
View Full Code Here

        addMouseMotionListener(new MouseMotionAdapter() {
            public void mouseDragged(MouseEvent event) {
                Rubik.this.mouseDragged(event.getX(), event.getY());
            }
        });
        addKeyListener(new KeyAdapter() {
            public void keyPressed(KeyEvent event) {
                Rubik.this.keyPressed(event.getKeyChar());
            }
        });
        rectX = new int[4];
View Full Code Here

TOP

Related Classes of java.awt.event.KeyAdapter

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.