src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java

Print this page




 813         //       value when the native notification comes to us
 814     }
 815 
 816     @Override
 817     public void setModalBlocked(boolean blocked) {
 818         if (target.getModalExclusionType() == Dialog.ModalExclusionType.APPLICATION_EXCLUDE) {
 819             return;
 820         }
 821 
 822         nativeSetEnabled(getNSWindowPtr(), !blocked);
 823     }
 824 
 825     public final void invalidateShadow(){
 826         nativeRevalidateNSWindowShadow(getNSWindowPtr());
 827     }
 828 
 829     // ----------------------------------------------------------------------
 830     //                          UTILITY METHODS
 831     // ----------------------------------------------------------------------
 832 
 833     /*
 834      * Find image to install into Title or into Application icon.
 835      * First try icons installed for toplevel. If there is no icon
 836      * use default Duke image.
 837      * This method shouldn't return null.
 838      */
 839     private CImage getImageForTarget() {
 840         List<Image> icons = target.getIconImages();
 841         if (icons == null || icons.size() == 0) {
 842             return null;


 843         }
 844         return CImage.getCreator().createFromImages(icons);
 845     }
 846 
 847     /*
 848      * Returns LWWindowPeer associated with this delegate.
 849      */
 850     @Override
 851     public LWWindowPeer getPeer() {
 852         return peer;
 853     }
 854 
 855     @Override
 856     public boolean isUnderMouse() {
 857         return contentView.isUnderMouse();
 858     }
 859 
 860     public CPlatformView getContentView() {
 861         return contentView;
 862     }
 863 
 864     @Override




 813         //       value when the native notification comes to us
 814     }
 815 
 816     @Override
 817     public void setModalBlocked(boolean blocked) {
 818         if (target.getModalExclusionType() == Dialog.ModalExclusionType.APPLICATION_EXCLUDE) {
 819             return;
 820         }
 821 
 822         nativeSetEnabled(getNSWindowPtr(), !blocked);
 823     }
 824 
 825     public final void invalidateShadow(){
 826         nativeRevalidateNSWindowShadow(getNSWindowPtr());
 827     }
 828 
 829     // ----------------------------------------------------------------------
 830     //                          UTILITY METHODS
 831     // ----------------------------------------------------------------------
 832 
 833     /**
 834      * Find image to install into Title or into Application icon. First try
 835      * icons installed for toplevel. Null is returned, if there is no icon and
 836      * default Duke image should be used.

 837      */
 838     private CImage getImageForTarget() {
 839         CImage icon = null;
 840         try {
 841             icon = CImage.getCreator().createFromImages(target.getIconImages());
 842         } catch (Exception ignored) {
 843             // Perhaps the icon passed into Java is broken. Skipping this icon.
 844         }
 845         return icon;
 846     }
 847 
 848     /*
 849      * Returns LWWindowPeer associated with this delegate.
 850      */
 851     @Override
 852     public LWWindowPeer getPeer() {
 853         return peer;
 854     }
 855 
 856     @Override
 857     public boolean isUnderMouse() {
 858         return contentView.isUnderMouse();
 859     }
 860 
 861     public CPlatformView getContentView() {
 862         return contentView;
 863     }
 864 
 865     @Override