protected void installDesktopManager() {
   desktopManager = desktop.getDesktopManager();
   if (desktopManager == null) {
     desktopManager = new BasicDesktopManager();
     desktop.setDesktopManager(desktopManager);
   }
 }
示例#2
0
 private void focusLastFrame() {
   for (int i = listMkWindow.size() - 1; i >= 0; i--) {
     JRootPane rootPaneJanela = SwingUtilities.getRootPane(listMkWindow.get(i));
     Container parentContainer = rootPaneJanela.getParent();
     if (parentContainer instanceof JInternalFrame) {
       JInternalFrame internalFrame = (JInternalFrame) parentContainer;
       desktopPane.getDesktopManager().activateFrame(internalFrame);
       try {
         internalFrame.setSelected(true);
       } catch (PropertyVetoException ex) {
         logger.error("Erro foco ulma janela", ex);
       }
       break;
     }
   }
 }
 public void removeInternalFrame(JInternalFrame internalFrame) {
   // Looks like #closeFrame is the proper way to remove an internal
   // frame.
   // It will activate the next frame. [Jon Aquino]
   desktopPane.getDesktopManager().closeFrame(internalFrame);
 }
 protected void uninstallDesktopManager() {
   if (desktop.getDesktopManager() instanceof UIResource) {
     desktop.setDesktopManager(null);
   }
   desktopManager = null;
 }