src/windows/classes/sun/awt/windows/WWindowPeer.java

Print this page




 255     static native int getSysIconWidth();
 256     static native int getSysIconHeight();
 257     static native int getSysSmIconWidth();
 258     static native int getSysSmIconHeight();
 259     /**windows/classes/sun/awt/windows/
 260      * Creates native icon from specified raster data and updates
 261      * icon for window and all descendant windows that inherit icon.
 262      * Raster data should be passed in the ARGB form.
 263      * Note that raster data format was changed to provide support
 264      * for XP icons with alpha-channel
 265      */
 266     native void setIconImagesData(int[] iconRaster, int w, int h,
 267                                   int[] smallIconRaster, int smw, int smh);
 268 
 269     synchronized native void reshapeFrame(int x, int y, int width, int height);
 270 
 271     public boolean requestWindowFocus(CausedFocusEvent.Cause cause) {
 272         if (!focusAllowedFor()) {
 273             return false;
 274         }
 275         return requestWindowFocus(cause == CausedFocusEvent.Cause.MOUSE_EVENT);
 276     }
 277     public native boolean requestWindowFocus(boolean isMouseEventCause);
 278 
 279     public boolean focusAllowedFor() {
 280         Window window = (Window)this.target;
 281         if (!window.isVisible() ||
 282             !window.isEnabled() ||
 283             !window.isFocusableWindow())
 284         {
 285             return false;
 286         }
 287         if (isModalBlocked()) {
 288             return false;
 289         }
 290         return true;
 291     }
 292 
 293     public void hide() {
 294         WindowListener listener = windowListener;
 295         if (listener != null) {
 296             // We're not getting WINDOW_CLOSING from the native code when hiding
 297             // the window programmatically. So, create it and notify the listener.




 255     static native int getSysIconWidth();
 256     static native int getSysIconHeight();
 257     static native int getSysSmIconWidth();
 258     static native int getSysSmIconHeight();
 259     /**windows/classes/sun/awt/windows/
 260      * Creates native icon from specified raster data and updates
 261      * icon for window and all descendant windows that inherit icon.
 262      * Raster data should be passed in the ARGB form.
 263      * Note that raster data format was changed to provide support
 264      * for XP icons with alpha-channel
 265      */
 266     native void setIconImagesData(int[] iconRaster, int w, int h,
 267                                   int[] smallIconRaster, int smw, int smh);
 268 
 269     synchronized native void reshapeFrame(int x, int y, int width, int height);
 270 
 271     public boolean requestWindowFocus(CausedFocusEvent.Cause cause) {
 272         if (!focusAllowedFor()) {
 273             return false;
 274         }
 275         return requestWindowFocus();
 276     }
 277     public native boolean requestWindowFocus();
 278 
 279     public boolean focusAllowedFor() {
 280         Window window = (Window)this.target;
 281         if (!window.isVisible() ||
 282             !window.isEnabled() ||
 283             !window.isFocusableWindow())
 284         {
 285             return false;
 286         }
 287         if (isModalBlocked()) {
 288             return false;
 289         }
 290         return true;
 291     }
 292 
 293     public void hide() {
 294         WindowListener listener = windowListener;
 295         if (listener != null) {
 296             // We're not getting WINDOW_CLOSING from the native code when hiding
 297             // the window programmatically. So, create it and notify the listener.