509 /** 510 * Part of the DisplayChangedListener interface: components 511 * do not need to react to this event 512 */ 513 public void paletteChanged() { 514 } 515 516 private native int getScreenImOn(); 517 518 // Used in Win32GraphicsDevice. 519 public final native void setFullScreenExclusiveModeState(boolean state); 520 521 /* 522 * ----END DISPLAY CHANGE SUPPORT---- 523 */ 524 525 public void grab() { 526 nativeGrab(); 527 } 528 529 public void ungrab() { 530 nativeUngrab(); 531 } 532 private native void nativeGrab(); 533 private native void nativeUngrab(); 534 535 private final boolean hasWarningWindow() { 536 return ((Window)target).getWarningString() != null; 537 } 538 539 boolean isTargetUndecorated() { 540 return true; 541 } 542 543 // These are the peer bounds. They get updated at: 544 // 1. the WWindowPeer.setBounds() method. 545 // 2. the native code (on WM_SIZE/WM_MOVE) 546 private volatile int sysX = 0; 547 private volatile int sysY = 0; 548 private volatile int sysW = 0; 549 private volatile int sysH = 0; 550 551 public native void repositionSecurityWarning(); 552 553 @Override 778 */ 779 @SuppressWarnings( value = {"deprecation", "unchecked"}) 780 private static class ActiveWindowListener implements PropertyChangeListener { 781 public void propertyChange(PropertyChangeEvent e) { 782 Window w = (Window)e.getNewValue(); 783 if (w == null) { 784 return; 785 } 786 AppContext appContext = SunToolkit.targetToAppContext(w); 787 synchronized (appContext) { 788 WWindowPeer wp = (WWindowPeer)w.getPeer(); 789 // add/move wp to the end of the list 790 List<WWindowPeer> l = (List<WWindowPeer>)appContext.get(ACTIVE_WINDOWS_KEY); 791 if (l != null) { 792 l.remove(wp); 793 l.add(wp); 794 } 795 } 796 } 797 } 798 } | 509 /** 510 * Part of the DisplayChangedListener interface: components 511 * do not need to react to this event 512 */ 513 public void paletteChanged() { 514 } 515 516 private native int getScreenImOn(); 517 518 // Used in Win32GraphicsDevice. 519 public final native void setFullScreenExclusiveModeState(boolean state); 520 521 /* 522 * ----END DISPLAY CHANGE SUPPORT---- 523 */ 524 525 public void grab() { 526 nativeGrab(); 527 } 528 529 public void ungrab(boolean doPost) { 530 nativeUngrab(doPost); 531 } 532 private native void nativeGrab(); 533 private native void nativeUngrab(boolean doPost); 534 535 private final boolean hasWarningWindow() { 536 return ((Window)target).getWarningString() != null; 537 } 538 539 boolean isTargetUndecorated() { 540 return true; 541 } 542 543 // These are the peer bounds. They get updated at: 544 // 1. the WWindowPeer.setBounds() method. 545 // 2. the native code (on WM_SIZE/WM_MOVE) 546 private volatile int sysX = 0; 547 private volatile int sysY = 0; 548 private volatile int sysW = 0; 549 private volatile int sysH = 0; 550 551 public native void repositionSecurityWarning(); 552 553 @Override 778 */ 779 @SuppressWarnings( value = {"deprecation", "unchecked"}) 780 private static class ActiveWindowListener implements PropertyChangeListener { 781 public void propertyChange(PropertyChangeEvent e) { 782 Window w = (Window)e.getNewValue(); 783 if (w == null) { 784 return; 785 } 786 AppContext appContext = SunToolkit.targetToAppContext(w); 787 synchronized (appContext) { 788 WWindowPeer wp = (WWindowPeer)w.getPeer(); 789 // add/move wp to the end of the list 790 List<WWindowPeer> l = (List<WWindowPeer>)appContext.get(ACTIVE_WINDOWS_KEY); 791 if (l != null) { 792 l.remove(wp); 793 l.add(wp); 794 } 795 } 796 } 797 } 798 799 @Override 800 public void grabFocus() { 801 grab(); 802 } 803 804 @Override 805 public void ungrabFocus(boolean postEvent) { 806 ungrab(postEvent); 807 } 808 } |