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;
     }
   }
 }
예제 #3
0
 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;
 }