< prev index next >

test/jdk/javax/swing/JWindow/ShapedAndTranslucentWindows/PerPixelTranslucentSwing.java

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import javax.swing.*;
  25 import java.awt.*;
  26 
  27 /*
  28  * @test

  29  * @key headful
  30  * @summary Check if a per-pixel translucent window shows only the area having
  31  *          opaque pixels
  32  * Test Description: Check if PERPIXEL_TRANSLUCENT Translucency type is supported
  33  *      on the current platform. Proceed if it is supported. Create a swing window
  34  *      with some swing components in it and a transparent background (alpha 0.0).
  35  *      Bring this window on top of a known background. Do this test for JFrame,
  36  *      JWindow and JDialog
  37  * Expected Result: Only the components present in the window must be shown. Other
  38  *      areas of the window must be transparent so that the background shows
  39  * @author mrkam
  40  * @library ../../../../lib/testlibrary
  41  * @build Common ExtendedRobot
  42  * @run main PerPixelTranslucentSwing
  43  */
  44 
  45 public class PerPixelTranslucentSwing extends Common {
  46 
  47     JButton north;
  48 




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 import javax.swing.*;
  25 import java.awt.*;
  26 
  27 /*
  28  * @test
  29  * @bug 8164811
  30  * @key headful
  31  * @summary Check if a per-pixel translucent window shows only the area having
  32  *          opaque pixels
  33  * Test Description: Check if PERPIXEL_TRANSLUCENT Translucency type is supported
  34  *      on the current platform. Proceed if it is supported. Create a swing window
  35  *      with some swing components in it and a transparent background (alpha 0.0).
  36  *      Bring this window on top of a known background. Do this test for JFrame,
  37  *      JWindow and JDialog
  38  * Expected Result: Only the components present in the window must be shown. Other
  39  *      areas of the window must be transparent so that the background shows
  40  * @author mrkam
  41  * @library ../../../../lib/testlibrary
  42  * @build Common ExtendedRobot
  43  * @run main PerPixelTranslucentSwing
  44  */
  45 
  46 public class PerPixelTranslucentSwing extends Common {
  47 
  48     JButton north;
  49 


< prev index next >