< prev index next >

src/java.desktop/macosx/classes/sun/lwawt/macosx/CWarningWindow.java

Print this page




 189     }
 190 
 191     public Rectangle getBounds() {
 192         synchronized (lock) {
 193             return bounds.getBounds();
 194         }
 195     }
 196 
 197     @Override
 198     public boolean isVisible() {
 199         synchronized (lock) {
 200             return visible;
 201         }
 202     }
 203 
 204     @Override
 205     public void setVisible(boolean visible) {
 206         synchronized (lock) {
 207             final long nsWindowPtr = getNSWindowPtr();
 208 
 209             // Process parent-child relationship when hiding
 210             if (!visible) {
 211                 // Unparent myself
 212                 if (owner != null && owner.isVisible()) {
 213                     CWrapper.NSWindow.removeChildWindow(
 214                             owner.getNSWindowPtr(), nsWindowPtr);
 215                 }
 216             }
 217 
 218             // Actually show or hide the window
 219             if (visible) {
 220                 CWrapper.NSWindow.orderFront(nsWindowPtr);
 221             } else {
 222                 CWrapper.NSWindow.orderOut(nsWindowPtr);
 223             }
 224 
 225             this.visible = visible;
 226 
 227             // Manage parent-child relationship when showing
 228             if (visible) {
 229                 // Add myself as a child
 230                 if (owner != null && owner.isVisible()) {
 231                     CWrapper.NSWindow.addChildWindow(owner.getNSWindowPtr(),
 232                             nsWindowPtr, CWrapper.NSWindow.NSWindowAbove);
 233 
 234                     // do not allow security warning to be obscured by other windows
 235                     applyWindowLevel(ownerWindow);
 236                 }
 237             }
 238         }
 239     }
 240 
 241     @Override
 242     public void notifyMouseWheelEvent(long when, int x, int y, int absX,
 243                                       int absY, int modifiers, int scrollType,
 244                                       int scrollAmount, int wheelRotation,
 245                                       double preciseWheelRotation,
 246                                       byte[] bdata) {
 247     }
 248 
 249     @Override
 250     public void notifyKeyEvent(int id, long when, int modifiers, int keyCode,
 251                                char keyChar, int keyLocation) {
 252     }




 189     }
 190 
 191     public Rectangle getBounds() {
 192         synchronized (lock) {
 193             return bounds.getBounds();
 194         }
 195     }
 196 
 197     @Override
 198     public boolean isVisible() {
 199         synchronized (lock) {
 200             return visible;
 201         }
 202     }
 203 
 204     @Override
 205     public void setVisible(boolean visible) {
 206         synchronized (lock) {
 207             final long nsWindowPtr = getNSWindowPtr();
 208 









 209             // Actually show or hide the window
 210             if (visible) {
 211                 CWrapper.NSWindow.orderFront(nsWindowPtr);
 212             } else {
 213                 CWrapper.NSWindow.orderOut(nsWindowPtr);
 214             }
 215 
 216             this.visible = visible;
 217 
 218             // Manage parent-child relationship when showing
 219             if (visible) {
 220                 // Order myself above my parent
 221                 if (owner != null && owner.isVisible()) {
 222                     CWrapper.NSWindow.orderWindow(nsWindowPtr,
 223                             CWrapper.NSWindow.NSWindowAbove, owner.getNSWindowPtr());
 224 
 225                     // do not allow security warning to be obscured by other windows
 226                     applyWindowLevel(ownerWindow);
 227                 }
 228             }
 229         }
 230     }
 231 
 232     @Override
 233     public void notifyMouseWheelEvent(long when, int x, int y, int absX,
 234                                       int absY, int modifiers, int scrollType,
 235                                       int scrollAmount, int wheelRotation,
 236                                       double preciseWheelRotation,
 237                                       byte[] bdata) {
 238     }
 239 
 240     @Override
 241     public void notifyKeyEvent(int id, long when, int modifiers, int keyCode,
 242                                char keyChar, int keyLocation) {
 243     }


< prev index next >