src/solaris/classes/sun/awt/X11GraphicsDevice.java

Print this page




 311                         new AWTPermission("fullScreenExclusive");
 312                 }
 313                 try {
 314                     security.checkPermission(fullScreenExclusivePermission);
 315                 } catch (SecurityException e) {
 316                     return false;
 317                 }
 318             }
 319         }
 320         return fsAvailable;
 321     }
 322 
 323     @Override
 324     public boolean isDisplayChangeSupported() {
 325         return (isFullScreenSupported() && (getFullScreenWindow() != null));
 326     }
 327 
 328     private static void enterFullScreenExclusive(Window w) {
 329         X11ComponentPeer peer = (X11ComponentPeer)w.getPeer();
 330         if (peer != null) {
 331             enterFullScreenExclusive(peer.getContentWindow());
 332             peer.setFullScreenExclusiveModeState(true);
 333         }
 334     }
 335 
 336     private static void exitFullScreenExclusive(Window w) {
 337         X11ComponentPeer peer = (X11ComponentPeer)w.getPeer();
 338         if (peer != null) {
 339             peer.setFullScreenExclusiveModeState(false);
 340             exitFullScreenExclusive(peer.getContentWindow());
 341         }
 342     }
 343 
 344     @Override
 345     public synchronized void setFullScreenWindow(Window w) {
 346         Window old = getFullScreenWindow();
 347         if (w == old) {
 348             return;
 349         }
 350 
 351         boolean fsSupported = isFullScreenSupported();
 352         if (fsSupported && old != null) {
 353             // enter windowed mode (and restore original display mode)
 354             exitFullScreenExclusive(old);
 355             setDisplayMode(origDisplayMode);
 356         }
 357 
 358         super.setFullScreenWindow(w);
 359 
 360         if (fsSupported && w != null) {




 311                         new AWTPermission("fullScreenExclusive");
 312                 }
 313                 try {
 314                     security.checkPermission(fullScreenExclusivePermission);
 315                 } catch (SecurityException e) {
 316                     return false;
 317                 }
 318             }
 319         }
 320         return fsAvailable;
 321     }
 322 
 323     @Override
 324     public boolean isDisplayChangeSupported() {
 325         return (isFullScreenSupported() && (getFullScreenWindow() != null));
 326     }
 327 
 328     private static void enterFullScreenExclusive(Window w) {
 329         X11ComponentPeer peer = (X11ComponentPeer)w.getPeer();
 330         if (peer != null) {
 331             enterFullScreenExclusive(peer.getWindow());
 332             peer.setFullScreenExclusiveModeState(true);
 333         }
 334     }
 335 
 336     private static void exitFullScreenExclusive(Window w) {
 337         X11ComponentPeer peer = (X11ComponentPeer)w.getPeer();
 338         if (peer != null) {
 339             peer.setFullScreenExclusiveModeState(false);
 340             exitFullScreenExclusive(peer.getWindow());
 341         }
 342     }
 343 
 344     @Override
 345     public synchronized void setFullScreenWindow(Window w) {
 346         Window old = getFullScreenWindow();
 347         if (w == old) {
 348             return;
 349         }
 350 
 351         boolean fsSupported = isFullScreenSupported();
 352         if (fsSupported && old != null) {
 353             // enter windowed mode (and restore original display mode)
 354             exitFullScreenExclusive(old);
 355             setDisplayMode(origDisplayMode);
 356         }
 357 
 358         super.setFullScreenWindow(w);
 359 
 360         if (fsSupported && w != null) {