modules/graphics/src/main/java/com/sun/javafx/tk/quantum/WindowStage.java

Print this page




 791         platformWindow.setEnabled(enabled);
 792         if (enabled) {
 793             // Check if window is really enabled - to handle nested case
 794             if (platformWindow.isEnabled()) {
 795                 requestToFront();
 796             }
 797         } else {
 798             removeActiveWindow(this);
 799         }
 800     }
 801 
 802     void setEnabled(boolean enabled) {
 803         if ((owner != null) && (owner instanceof WindowStage)) {
 804             ((WindowStage) owner).setEnabled(enabled);
 805         }
 806         /*
 807          * RT-17588 - exit if stage is closed from under us as 
 808          *            any further access to the Glass layer 
 809          *            will throw an exception
 810          */
 811         if (enabled && platformWindow.isClosed()) {
 812             return;
 813         }
 814         setPlatformEnabled(enabled);
 815         if (enabled) {
 816             if (isAppletStage && null != appletWindow) {
 817                 appletWindow.assertStageOrder();
 818             }
 819         }
 820     }
 821 
 822     // Note: This method is required to workaround a glass issue mentioned in RT-12607
 823     protected void requestToFront() {

 824         platformWindow.toFront();
 825         platformWindow.requestFocus();
 826     }

 827 
 828     public void setInEventHandler(boolean inEventHandler) {
 829         this.inEventHandler = inEventHandler;
 830     }
 831 
 832     public boolean isInEventHandler() {
 833         return inEventHandler;
 834     }
 835 
 836     @Override
 837     public void requestInput(String text, int type, double width, double height, 
 838                         double Mxx, double Mxy, double Mxz, double Mxt,
 839                         double Myx, double Myy, double Myz, double Myt, 
 840                         double Mzx, double Mzy, double Mzz, double Mzt) {
 841         platformWindow.requestInput(text, type, width, height, 
 842                                     Mxx, Mxy, Mxz, Mxt, 
 843                                     Myx, Myy, Myz, Myt, 
 844                                     Mzx, Mzy, Mzz, Mzt);
 845     }
 846 


 791         platformWindow.setEnabled(enabled);
 792         if (enabled) {
 793             // Check if window is really enabled - to handle nested case
 794             if (platformWindow.isEnabled()) {
 795                 requestToFront();
 796             }
 797         } else {
 798             removeActiveWindow(this);
 799         }
 800     }
 801 
 802     void setEnabled(boolean enabled) {
 803         if ((owner != null) && (owner instanceof WindowStage)) {
 804             ((WindowStage) owner).setEnabled(enabled);
 805         }
 806         /*
 807          * RT-17588 - exit if stage is closed from under us as 
 808          *            any further access to the Glass layer 
 809          *            will throw an exception
 810          */
 811         if (enabled && platformWindow == null || platformWindow.isClosed()) {
 812             return;
 813         }
 814         setPlatformEnabled(enabled);
 815         if (enabled) {
 816             if (isAppletStage && null != appletWindow) {
 817                 appletWindow.assertStageOrder();
 818             }
 819         }
 820     }
 821 
 822     // Note: This method is required to workaround a glass issue mentioned in RT-12607
 823     protected void requestToFront() {
 824         if (platformWindow != null) {
 825             platformWindow.toFront();
 826             platformWindow.requestFocus();
 827         }
 828     }
 829 
 830     public void setInEventHandler(boolean inEventHandler) {
 831         this.inEventHandler = inEventHandler;
 832     }
 833 
 834     public boolean isInEventHandler() {
 835         return inEventHandler;
 836     }
 837 
 838     @Override
 839     public void requestInput(String text, int type, double width, double height, 
 840                         double Mxx, double Mxy, double Mxz, double Mxt,
 841                         double Myx, double Myy, double Myz, double Myt, 
 842                         double Mzx, double Mzy, double Mzz, double Mzt) {
 843         platformWindow.requestInput(text, type, width, height, 
 844                                     Mxx, Mxy, Mxz, Mxt, 
 845                                     Myx, Myy, Myz, Myt, 
 846                                     Mzx, Mzy, Mzz, Mzt);
 847     }
 848