1 26 27 package net.sourceforge.groboutils.uicapture.v1.event; 28 29 import java.awt.Robot ; 30 import java.awt.event.InputEvent ; 31 import java.awt.event.KeyEvent ; 32 33 34 40 public class KeyPressedCaptureEvent extends KeyCaptureEvent 41 { 42 public KeyPressedCaptureEvent( KeyEvent event ) 43 { 44 super( CE_KEY_PRESSED, event ); 45 } 46 47 48 public KeyPressedCaptureEvent( int keyCode ) 49 { 50 super( CE_KEY_PRESSED, keyCode ); 51 } 52 53 54 public void performEvent( Robot r ) 55 { 56 super.performEvent( r ); 57 r.keyPress( getKeyCode() ); 58 } 59 } 60 61 | Popular Tags |