示例#1
0
文件: JSheet.java 项目: karlvr/Quaqua
 protected void hide0() {
   JRootPane rp = null;
   if (getOwner() instanceof JFrame) {
     rp = ((JFrame) getOwner()).getRootPane();
   } else if (getOwner() instanceof JDialog) {
     rp = ((JDialog) getOwner()).getRootPane();
   }
   if (rp != null && !isDocumentModalitySupported() && !isExperimentalSheet()) {
     Component blockingComponent = rp.getGlassPane();
     blockingComponent.setVisible(false);
     if (ownersGlassPane != null) {
       rp.setGlassPane(ownersGlassPane);
       ownersGlassPane = null;
     }
   }
   super.hide();
 }
示例#2
0
 @Override
 @SuppressWarnings("deprecation")
 public void hide() {
   super.hide();
   if (myFocusTrackback != null
       && !(myFocusTrackback.isSheduledForRestore()
           || myFocusTrackback.isWillBeSheduledForRestore())) {
     myFocusTrackback.setWillBeSheduledForRestore();
     IdeFocusManager mgr = getFocusManager();
     Runnable r =
         new Runnable() {
           @Override
           public void run() {
             if (myFocusTrackback != null) myFocusTrackback.restoreFocus();
             myFocusTrackback = null;
           }
         };
     mgr.doWhenFocusSettlesDown(r);
   }
 }