src/share/classes/java/awt/GraphicsDevice.java

Print this page




  52  *   GraphicsDevice[] gs = ge.getScreenDevices();
  53  *   for (int j = 0; j < gs.length; j++) {
  54  *      GraphicsDevice gd = gs[j];
  55  *      GraphicsConfiguration[] gc =
  56  *      gd.getConfigurations();
  57  *      for (int i=0; i < gc.length; i++) {
  58  *         JFrame f = new
  59  *         JFrame(gs[j].getDefaultConfiguration());
  60  *         Canvas c = new Canvas(gc[i]);
  61  *         Rectangle gcBounds = gc[i].getBounds();
  62  *         int xoffs = gcBounds.x;
  63  *         int yoffs = gcBounds.y;
  64  *         f.getContentPane().add(c);
  65  *         f.setLocation((i*50)+xoffs, (i*60)+yoffs);
  66  *         f.show();
  67  *      }
  68  *   }
  69  * </pre>
  70  * <p>
  71  * For more information on full-screen exclusive mode API, see the
  72  * <a href="http://java.sun.com/docs/books/tutorial/extra/fullscreen/index.html">
  73  * Full-Screen Exclusive Mode API Tutorial</a>.
  74  *
  75  * @see GraphicsEnvironment
  76  * @see GraphicsConfiguration
  77  */
  78 public abstract class GraphicsDevice {
  79 
  80     private Window fullScreenWindow;
  81     private AppContext fullScreenAppContext; // tracks which AppContext
  82                                              // created the FS window
  83     // this lock is used for making synchronous changes to the AppContext's
  84     // current full screen window
  85     private final Object fsAppContextLock = new Object();
  86 
  87     private Rectangle windowedModeBounds;
  88 
  89     /**
  90      * This is an abstract class that cannot be instantiated directly.
  91      * Instances must be obtained from a suitable factory or query method.
  92      * @see GraphicsEnvironment#getScreenDevices




  52  *   GraphicsDevice[] gs = ge.getScreenDevices();
  53  *   for (int j = 0; j < gs.length; j++) {
  54  *      GraphicsDevice gd = gs[j];
  55  *      GraphicsConfiguration[] gc =
  56  *      gd.getConfigurations();
  57  *      for (int i=0; i < gc.length; i++) {
  58  *         JFrame f = new
  59  *         JFrame(gs[j].getDefaultConfiguration());
  60  *         Canvas c = new Canvas(gc[i]);
  61  *         Rectangle gcBounds = gc[i].getBounds();
  62  *         int xoffs = gcBounds.x;
  63  *         int yoffs = gcBounds.y;
  64  *         f.getContentPane().add(c);
  65  *         f.setLocation((i*50)+xoffs, (i*60)+yoffs);
  66  *         f.show();
  67  *      }
  68  *   }
  69  * </pre>
  70  * <p>
  71  * For more information on full-screen exclusive mode API, see the
  72  * <a href="http://docs.oracle.com/javase/tutorial/extra/fullscreen/index.html">
  73  * Full-Screen Exclusive Mode API Tutorial</a>.
  74  *
  75  * @see GraphicsEnvironment
  76  * @see GraphicsConfiguration
  77  */
  78 public abstract class GraphicsDevice {
  79 
  80     private Window fullScreenWindow;
  81     private AppContext fullScreenAppContext; // tracks which AppContext
  82                                              // created the FS window
  83     // this lock is used for making synchronous changes to the AppContext's
  84     // current full screen window
  85     private final Object fsAppContextLock = new Object();
  86 
  87     private Rectangle windowedModeBounds;
  88 
  89     /**
  90      * This is an abstract class that cannot be instantiated directly.
  91      * Instances must be obtained from a suitable factory or query method.
  92      * @see GraphicsEnvironment#getScreenDevices