58 @Override 59 public native void mousePress(int buttons); 60 @Override 61 public native void mouseRelease(int buttons); 62 @Override 63 public native void mouseWheel(int wheelAmt); 64 65 @Override 66 public native void keyPress( int keycode ); 67 @Override 68 public native void keyRelease( int keycode ); 69 70 @Override 71 public int getRGBPixel(int x, int y) { 72 // See 7002846: that's ineffective, but works correctly with non-opaque windows 73 return getRGBPixels(new Rectangle(x, y, 1, 1))[0]; 74 } 75 76 @Override 77 public int [] getRGBPixels(Rectangle bounds) { 78 int pixelArray[] = new int[bounds.width*bounds.height]; 79 getRGBPixels(bounds.x, bounds.y, bounds.width, bounds.height, pixelArray); 80 return pixelArray; 81 } 82 83 private native void getRGBPixels(int x, int y, int width, int height, int pixelArray[]); 84 } | 58 @Override 59 public native void mousePress(int buttons); 60 @Override 61 public native void mouseRelease(int buttons); 62 @Override 63 public native void mouseWheel(int wheelAmt); 64 65 @Override 66 public native void keyPress( int keycode ); 67 @Override 68 public native void keyRelease( int keycode ); 69 70 @Override 71 public int getRGBPixel(int x, int y) { 72 // See 7002846: that's ineffective, but works correctly with non-opaque windows 73 return getRGBPixels(new Rectangle(x, y, 1, 1))[0]; 74 } 75 76 @Override 77 public int [] getRGBPixels(Rectangle bounds) { 78 int[] pixelArray = new int[bounds.width*bounds.height]; 79 getRGBPixels(bounds.x, bounds.y, bounds.width, bounds.height, pixelArray); 80 return pixelArray; 81 } 82 83 private native void getRGBPixels(int x, int y, int width, int height, int[] pixelArray); 84 } |