< prev index next >

src/java.desktop/windows/classes/sun/awt/windows/WButtonPeer.java

Print this page




  78             public void run() {
  79                 postEvent(new ActionEvent(target, ActionEvent.ACTION_PERFORMED,
  80                                           ((Button)target).getActionCommand(),
  81                                           when, modifiers));
  82             }
  83         }, when);
  84     }
  85 
  86 
  87     @Override
  88     public boolean shouldClearRectBeforePaint() {
  89         return false;
  90     }
  91 
  92     /**
  93      * Initialize JNI field and method IDs
  94      */
  95     private static native void initIDs();
  96 
  97     @Override

  98     public boolean handleJavaKeyEvent(KeyEvent e) {
  99          switch (e.getID()) {
 100             case KeyEvent.KEY_RELEASED:
 101                 if (e.getKeyCode() == KeyEvent.VK_SPACE){
 102                     handleAction(e.getWhen(), e.getModifiers());
 103                 }
 104             break;
 105          }
 106          return false;
 107     }
 108 }


  78             public void run() {
  79                 postEvent(new ActionEvent(target, ActionEvent.ACTION_PERFORMED,
  80                                           ((Button)target).getActionCommand(),
  81                                           when, modifiers));
  82             }
  83         }, when);
  84     }
  85 
  86 
  87     @Override
  88     public boolean shouldClearRectBeforePaint() {
  89         return false;
  90     }
  91 
  92     /**
  93      * Initialize JNI field and method IDs
  94      */
  95     private static native void initIDs();
  96 
  97     @Override
  98     @SuppressWarnings("deprecation")
  99     public boolean handleJavaKeyEvent(KeyEvent e) {
 100          switch (e.getID()) {
 101             case KeyEvent.KEY_RELEASED:
 102                 if (e.getKeyCode() == KeyEvent.VK_SPACE){
 103                     handleAction(e.getWhen(), e.getModifiers());
 104                 }
 105             break;
 106          }
 107          return false;
 108     }
 109 }
< prev index next >