283 static native int getSysSmIconWidth(); 284 static native int getSysSmIconHeight(); 285 /**windows/classes/sun/awt/windows/ 286 * Creates native icon from specified raster data and updates 287 * icon for window and all descendant windows that inherit icon. 288 * Raster data should be passed in the ARGB form. 289 * Note that raster data format was changed to provide support 290 * for XP icons with alpha-channel 291 */ 292 native void setIconImagesData(int[] iconRaster, int w, int h, 293 int[] smallIconRaster, int smw, int smh); 294 295 synchronized native void reshapeFrame(int x, int y, int width, int height); 296 297 native Dimension getNativeWindowSize(); 298 299 public Dimension getScaledWindowSize() { 300 return getNativeWindowSize(); 301 } 302 303 public boolean requestWindowFocus(CausedFocusEvent.Cause cause) { 304 if (!focusAllowedFor()) { 305 return false; 306 } 307 return requestWindowFocus(cause == CausedFocusEvent.Cause.MOUSE_EVENT); 308 } 309 private native boolean requestWindowFocus(boolean isMouseEventCause); 310 311 public boolean focusAllowedFor() { 312 Window window = (Window)this.target; 313 if (!window.isVisible() || 314 !window.isEnabled() || 315 !window.isFocusableWindow()) 316 { 317 return false; 318 } 319 if (isModalBlocked()) { 320 return false; 321 } 322 return true; 323 } 324 325 @Override 326 void hide() { 327 WindowListener listener = windowListener; | 283 static native int getSysSmIconWidth(); 284 static native int getSysSmIconHeight(); 285 /**windows/classes/sun/awt/windows/ 286 * Creates native icon from specified raster data and updates 287 * icon for window and all descendant windows that inherit icon. 288 * Raster data should be passed in the ARGB form. 289 * Note that raster data format was changed to provide support 290 * for XP icons with alpha-channel 291 */ 292 native void setIconImagesData(int[] iconRaster, int w, int h, 293 int[] smallIconRaster, int smw, int smh); 294 295 synchronized native void reshapeFrame(int x, int y, int width, int height); 296 297 native Dimension getNativeWindowSize(); 298 299 public Dimension getScaledWindowSize() { 300 return getNativeWindowSize(); 301 } 302 303 public boolean requestWindowFocus(FocusEvent.Cause cause) { 304 if (!focusAllowedFor()) { 305 return false; 306 } 307 return requestWindowFocus(cause == FocusEvent.Cause.MOUSE_EVENT); 308 } 309 private native boolean requestWindowFocus(boolean isMouseEventCause); 310 311 public boolean focusAllowedFor() { 312 Window window = (Window)this.target; 313 if (!window.isVisible() || 314 !window.isEnabled() || 315 !window.isFocusableWindow()) 316 { 317 return false; 318 } 319 if (isModalBlocked()) { 320 return false; 321 } 322 return true; 323 } 324 325 @Override 326 void hide() { 327 WindowListener listener = windowListener; |