< prev index next >

src/java.desktop/share/classes/java/awt/peer/RobotPeer.java

Print this page
rev 60071 : 8211999: Window positioning bugs due to overlapping GraphicsDevice bounds (Windows/HiDPI)
Reviewed-by: XXX
   1 /*
   2  * Copyright (c) 1999, 2019, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 100      *
 101      * @param x the X screen coordinate
 102      * @param y the Y screen coordinate
 103      *
 104      * @return the RGB value of the specified pixel on screen
 105      *
 106      * @see Robot#getPixelColor(int, int)
 107      */
 108     int getRGBPixel(int x, int y);
 109 
 110     /**
 111      * Gets the RGB values of the specified screen area as an array.
 112      *
 113      * @param bounds the screen area to capture the RGB values from
 114      *
 115      * @return the RGB values of the specified screen area
 116      *
 117      * @see Robot#createScreenCapture(Rectangle)
 118      */
 119     int[] getRGBPixels(Rectangle bounds);










 120 }
   1 /*
   2  * Copyright (c) 1999, 2020, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 100      *
 101      * @param x the X screen coordinate
 102      * @param y the Y screen coordinate
 103      *
 104      * @return the RGB value of the specified pixel on screen
 105      *
 106      * @see Robot#getPixelColor(int, int)
 107      */
 108     int getRGBPixel(int x, int y);
 109 
 110     /**
 111      * Gets the RGB values of the specified screen area as an array.
 112      *
 113      * @param bounds the screen area to capture the RGB values from
 114      *
 115      * @return the RGB values of the specified screen area
 116      *
 117      * @see Robot#createScreenCapture(Rectangle)
 118      */
 119     int[] getRGBPixels(Rectangle bounds);
 120 
 121     /**
 122      * Determines if absolute coordinates should be used by this peer.
 123      *
 124      * @return {@code true} if absolute coordinates should be used,
 125      *         {@code false} otherwise
 126      */
 127     default boolean useAbsoluteCoordinates() {
 128         return false;
 129     }
 130 }
< prev index next >