< prev index next >

test/sun/java2d/SunGraphics2D/SurfaceDestination/SurfaceDestination.java

Print this page
rev 14836 : 8159690: [TESTBUG] Mark headful tests with @key headful.


  24 import java.awt.Component;
  25 import java.awt.Frame;
  26 import java.awt.Graphics;
  27 import java.awt.GraphicsConfiguration;
  28 import java.awt.GraphicsDevice;
  29 import java.awt.GraphicsEnvironment;
  30 import java.awt.Image;
  31 import java.awt.Window;
  32 import java.awt.image.BufferedImage;
  33 
  34 import sun.java2d.SunGraphics2D;
  35 
  36 import static java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment;
  37 import static java.awt.Transparency.BITMASK;
  38 import static java.awt.Transparency.OPAQUE;
  39 import static java.awt.Transparency.TRANSLUCENT;
  40 import static java.awt.image.BufferedImage.TYPE_INT_ARGB;
  41 
  42 /**
  43  * @test

  44  * @bug 8134603
  45  * @modules java.desktop/sun.java2d
  46  * @run main/othervm SurfaceDestination
  47  */
  48 public final class SurfaceDestination {
  49 
  50     public static void main(final String[] args) {
  51         final GraphicsEnvironment lge = getLocalGraphicsEnvironment();
  52         final GraphicsDevice dev = lge.getDefaultScreenDevice();
  53         final GraphicsConfiguration config = dev.getDefaultConfiguration();
  54 
  55         test(config.createCompatibleImage(10, 10).getGraphics());
  56         test(config.createCompatibleImage(10, 10, OPAQUE).getGraphics());
  57         test(config.createCompatibleImage(10, 10, BITMASK).getGraphics());
  58         test(config.createCompatibleImage(10, 10, TRANSLUCENT).getGraphics());
  59 
  60         test(new BufferedImage(10, 10, TYPE_INT_ARGB).getGraphics());
  61 
  62         final Window frame = new Frame();
  63         frame.pack();




  24 import java.awt.Component;
  25 import java.awt.Frame;
  26 import java.awt.Graphics;
  27 import java.awt.GraphicsConfiguration;
  28 import java.awt.GraphicsDevice;
  29 import java.awt.GraphicsEnvironment;
  30 import java.awt.Image;
  31 import java.awt.Window;
  32 import java.awt.image.BufferedImage;
  33 
  34 import sun.java2d.SunGraphics2D;
  35 
  36 import static java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment;
  37 import static java.awt.Transparency.BITMASK;
  38 import static java.awt.Transparency.OPAQUE;
  39 import static java.awt.Transparency.TRANSLUCENT;
  40 import static java.awt.image.BufferedImage.TYPE_INT_ARGB;
  41 
  42 /**
  43  * @test
  44  * @key headful
  45  * @bug 8134603
  46  * @modules java.desktop/sun.java2d
  47  * @run main/othervm SurfaceDestination
  48  */
  49 public final class SurfaceDestination {
  50 
  51     public static void main(final String[] args) {
  52         final GraphicsEnvironment lge = getLocalGraphicsEnvironment();
  53         final GraphicsDevice dev = lge.getDefaultScreenDevice();
  54         final GraphicsConfiguration config = dev.getDefaultConfiguration();
  55 
  56         test(config.createCompatibleImage(10, 10).getGraphics());
  57         test(config.createCompatibleImage(10, 10, OPAQUE).getGraphics());
  58         test(config.createCompatibleImage(10, 10, BITMASK).getGraphics());
  59         test(config.createCompatibleImage(10, 10, TRANSLUCENT).getGraphics());
  60 
  61         test(new BufferedImage(10, 10, TYPE_INT_ARGB).getGraphics());
  62 
  63         final Window frame = new Frame();
  64         frame.pack();


< prev index next >