src/solaris/classes/sun/awt/X11/XContentWindow.java

Print this page




  98           // We don't want SHOWN/HIDDEN on content window since it will duplicate XDecoratedPeer
  99           case XConstants.MapNotify:
 100           case XConstants.UnmapNotify:
 101               return true;
 102           default:
 103               return super.isEventDisabled(e) || parentFrame.isEventDisabled(e);
 104         }
 105     }
 106 
 107     // Coordinates are that of the shell
 108     void setContentBounds(WindowDimensions dims) {
 109         XToolkit.awtLock();
 110         try {
 111             // Bounds of content window are of the same size as bounds of Java window and with
 112             // location as -(insets)
 113             Rectangle newBounds = dims.getBounds();
 114             Insets in = dims.getInsets();
 115             if (in != null) {
 116                 newBounds.setLocation(-in.left, -in.top);
 117             }
 118             if (insLog.isLoggable(PlatformLogger.FINE)) insLog.fine("Setting content bounds {0}, old bounds {1}",

 119                                                                     newBounds, getBounds());

 120             // Fix for 5023533:
 121             // Change in the size of the content window means, well, change of the size
 122             // Change in the location of the content window means change in insets
 123             boolean needHandleResize = !(newBounds.equals(getBounds()));
 124             reshape(newBounds);
 125             if (needHandleResize) {
 126                 insLog.fine("Sending RESIZED");
 127                 handleResize(newBounds);
 128             }
 129         } finally {
 130             XToolkit.awtUnlock();
 131         }
 132         validateSurface();
 133     }
 134 
 135     // NOTE: This method may be called by privileged threads.
 136     //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
 137     public void handleResize(Rectangle bounds) {
 138         AWTAccessor.getComponentAccessor().setSize((Component)target, bounds.width, bounds.height);
 139         postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_RESIZED));




  98           // We don't want SHOWN/HIDDEN on content window since it will duplicate XDecoratedPeer
  99           case XConstants.MapNotify:
 100           case XConstants.UnmapNotify:
 101               return true;
 102           default:
 103               return super.isEventDisabled(e) || parentFrame.isEventDisabled(e);
 104         }
 105     }
 106 
 107     // Coordinates are that of the shell
 108     void setContentBounds(WindowDimensions dims) {
 109         XToolkit.awtLock();
 110         try {
 111             // Bounds of content window are of the same size as bounds of Java window and with
 112             // location as -(insets)
 113             Rectangle newBounds = dims.getBounds();
 114             Insets in = dims.getInsets();
 115             if (in != null) {
 116                 newBounds.setLocation(-in.left, -in.top);
 117             }
 118             if (insLog.isLoggable(PlatformLogger.FINE)) {
 119                 insLog.fine("Setting content bounds {0}, old bounds {1}",
 120                             newBounds, getBounds());
 121             }
 122             // Fix for 5023533:
 123             // Change in the size of the content window means, well, change of the size
 124             // Change in the location of the content window means change in insets
 125             boolean needHandleResize = !(newBounds.equals(getBounds()));
 126             reshape(newBounds);
 127             if (needHandleResize) {
 128                 insLog.fine("Sending RESIZED");
 129                 handleResize(newBounds);
 130             }
 131         } finally {
 132             XToolkit.awtUnlock();
 133         }
 134         validateSurface();
 135     }
 136 
 137     // NOTE: This method may be called by privileged threads.
 138     //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
 139     public void handleResize(Rectangle bounds) {
 140         AWTAccessor.getComponentAccessor().setSize((Component)target, bounds.width, bounds.height);
 141         postEvent(new ComponentEvent(target, ComponentEvent.COMPONENT_RESIZED));